Simplified Percentile ClusteringSimplified Percentile Clustering (SPC) is a clustering system for trend regime analysis.
Instead of relying on heavy iterative algorithms such as k-means, SPC takes a deterministic approach: it uses percentiles and running averages to form cluster centers directly from the data, producing smooth, interpretable market state segmentation that updates live with every bar.
Most clustering algorithms are designed for offline datasets, they require recomputation, multiple iterations, and fixed sample sizes.
SPC borrows from both statistical normalization and distance-based clustering theory , but simplifies them. Percentiles ensure that cluster centers are resistant to outliers , while the running mean provides a stable mid-point reference.
Unlike iterative methods, SPC’s centers evolve smoothly with time, ideal for charts that must update in real time without sudden reclassification noise.
SPC provides a simple yet powerful clustering heuristic that:
Runs continuously in a charting environment,
Remains interpretable and reproducible,
And allows traders to see how close the current market state is to transitioning between regimes.
Clustering by Percentiles
Traditional clustering methods find centers through iteration. SPC defines them deterministically using three simple statistics within a moving window:
Lower percentile (p_low) → captures the lower basin of feature values.
Upper percentile (p_high) → captures the upper basin.
Mean (mid) → represents the central tendency.
From these, SPC computes stable “centers”:
// K = 2 → two regimes (e.g., bullish / bearish)
=
// K = 3 → adds a neutral zone
=
These centers move gradually with the market, forming live regime boundaries without ever needing convergence steps.
Two clusters capture directional bias; three clusters add a neutral ‘range’ state.
Multi-Feature Fusion
While SPC can cluster a single feature such as RSI, CCI, Fisher Transform, DMI, Z-Score, or the price-to-MA ratio (MAR), its real strength lies in feature fusion. Each feature adds a unique lens to the clustering system. By toggling features on or off, traders can test how each dimension contributes to the regime structure.
In “Clusters” mode, SPC measures how far the current bar is from each cluster center across all enabled features, averages these distances, and assigns the bar to the nearest combined center. This effectively creates a multi-dimensional regime map , where each feature contributes equally to defining the overall market state.
The fusion distance is computed as:
dist := (rsi_d * on_off(use_rsi) + cci_d * on_off(use_cci) + fis_d * on_off(use_fis) + dmi_d * on_off(use_dmi) + zsc_d * on_off(use_zsc) + mar_d * on_off(use_mar)) / (on_off(use_rsi) + on_off(use_cci) + on_off(use_fis) + on_off(use_dmi) + on_off(use_zsc) + on_off(use_mar))
Because each feature can be standardized (Z-Score), the distances remain comparable across different scales.
Fusion mode combines multiple standardized features into a single smooth regime signal.
Visualizing Proximity - The Transition Gradient
Most indicators show binary or discrete conditions (e.g., bullish/bearish). SPC goes further, it quantifies how close the current value is to flipping into the next cluster.
It measures the distances to the two nearest cluster centers and interpolates between them:
rel_pos = min_dist / (min_dist + second_min_dist)
real_clust = cluster_val + (second_val - cluster_val) * rel_pos
This real_clust output forms a continuous line that moves smoothly between clusters:
Near 0.0 → firmly within the current regime
Around 0.5 → balanced between clusters (transition zone)
Near 1.0 → about to flip into the next regime
Smooth interpolation reveals when the market is close to a regime change.
How to Tune the Parameters
SPC includes intuitive parameters to adapt sensitivity and stability:
K Clusters (2–3): Defines the number of regimes. K = 2 for trend/range distinction, K = 3 for trend/neutral transitions.
Lookback: Determines the number of past bars used for percentile and mean calculations. Higher = smoother, more stable clusters. Lower = faster reaction to new trends.
Lower / Upper Percentiles: Define what counts as “low” and “high” states. Adjust to widen or tighten cluster ranges.
Shorter lookbacks react quickly to shifts; longer lookbacks smooth the clusters.
Visual Interpretation
In “Clusters” mode, SPC plots:
A colored histogram for each cluster (red, orange, green depending on K)
Horizontal guide lines separating cluster levels
Smooth proximity transitions between states
Each bar’s color also changes based on its assigned cluster, allowing quick recognition of when the market transitions between regimes.
Cluster bands visualize regime structure and transitions at a glance.
Practical Applications
Identify market regimes (bullish, neutral, bearish) in real time
Detect early transition phases before a trend flip occurs
Fuse multiple indicators into a single consistent signal
Engineer interpretable features for machine-learning research
Build adaptive filters or hybrid signals based on cluster proximity
Final Notes
Simplified Percentile Clustering (SPC) provides a balance between mathematical rigor and visual intuition. It replaces complex iterative algorithms with a clear, deterministic logic that any trader can understand, and yet retains the multidimensional insight of a fusion-based clustering system.
Use SPC to study how different indicators align, how regimes evolve, and how transitions emerge in real time. It’s not about predicting; it’s about seeing the structure of the market unfold.
Disclaimer
This indicator is intended for educational and analytical use.
It does not generate buy or sell signals.
Historical regime transitions are not indicative of future performance.
Always validate insights with independent analysis before making trading decisions.
Educational
TASC 2025.11 The Points and Line Chart█ OVERVIEW
This script implements the Points and Line Chart described by Mohamed Ashraf Mahfouz and Mohamed Meregy in the November 2025 edition of the TASC Traders' Tips , "Efficient Display of Irregular Time Series”. This novel chart type interprets regular time series chart data to create an irregular time series chart.
█ CONCEPTS
When formatting data for display on a price chart, there are two main categorizations of chart types: regular time series (RTS) and irregular time series (ITS).
RTS charts, such as a typical candlestick chart, collect data over a specified amount of time and display it at one point. A one-minute candle, for example, represents the entirety of price movements within the minute that it represents.
ITS charts display data only after certain conditions are met. Since they do not plot at a consistent time period, they are called “irregular”.
Typically, ITS charts, such as Point and Figure (P&F) and Renko charts, focus on price change, plotting only when a certain threshold of change occurs.
The Points and Line (P&L) chart operates similarly to a P&F chart, using price change to determine when to plot points. However, instead of plotting the price in points, the P&L chart (by default) plots the closing price from RTS data. In other words, the P&L chart plots its points at the actual RTS close, as opposed to (price) intervals based on point size. This approach creates an ITS while still maintaining a reference to the RTS data, allowing us to gain a better understanding of time while consolidating the chart into an ITS format.
█ USAGE
Because the P&L chart forms bars based on price action instead of time, it displays displays significantly more history than a typical RTS chart. With this view, we are able to more easily spot support and resistance levels, which we could use when looking to place trades.
In the chart below, we can see over 13 years of data consolidated into one single view.
To view specific chart details, hover over each point of the chart to see a list of information.
In addition to providing a compact view of price movement over larger periods, this new chart type helps make classic chart patterns easier to interpret. When considering breakouts, the closing price provides a clearer representation of the actual breakout, as opposed to point size plots which are limited.
Because P&L is a new charting type, this script still requires a standard RTS chart for proper calculations. However, the main price chart is not intended for interpretation alongside the P&L chart; users can hide the main price series to keep the chart clean.
█ DISPLAYS
This indicator creates two displays: the "Price Display" and the "Data Display".
With the "Price display" setting, users can choose between showing a line or OHLC candles for the P&L drawing. The line display shows the close price of the P&L chart. In the candle display, the close price remains the same, while the open, high, and low values depend on the price action between points.
With the "Data display" setting, users can enable the display of a histogram that shows either the total volume or days/bars between the points in the P&L chart. For example, a reading of 12 days would indicate that the time since the last point was 12 days.
Note: The "Days" setting actually shows the number of chart bars elapsed between P&L points. The displayed value represents days only if the chart uses the "1D" timeframe.
The "Overlay P&L on chart" input controls whether the P&L line or candles appear on the main chart pane or in a separate pane.
Users can deactivate either display by selecting "None" from the corresponding input.
Technical Note: Due to drawing limitations, this indicator has the following display limits:
The line display can show data to 10,000 P&L points.
The candle display and tooltips show data for up to 500 points.
The histograms show data for up to 3,333 points.
█ INPUTS
Reversal Amount: The number of points/steps required to determine a reversal.
Scale size Method: The method used to filter price movements. By default, the P&L chart uses the same scaling method as the P&F chart. Optionally, this scaling method can be changed to use ATR or Percent.
P&L Method: The prices to plot and use for filtering:
“Close” plots the closing price and uses it to determine movements.
“High/Low” uses the high price on upside moves and low price on downside moves.
"Point Size" uses the closing price for filtration, but locks the price to plot at point size intervals.
Dynamic Volume Based Key Price LevelsDescription
This indicator introduces a volume-based approach to detecting support and resistance zones.
Instead of relying on price swings or pivots, it analyzes where the most trading activity occurred within a selected lookback period, then marks those levels directly on the chart.
The result is a clear visual map of price areas with strong historical participation, which often act as reaction zones in future moves.
How It Works
The script divides the analyzed range into price bins, sums traded volume for each bin, and highlights the strongest levels based on their share of total volume.
It also includes an optional multi-timeframe mode, allowing traders to analyze higher timeframe volume structures on a lower timeframe chart.
Key Features
🔹 Volume-Based Key Levels Detection: Finds statistically meaningful price zones derived from raw volume data.
🔹 Multi-Timeframe Mode: Optionally use higher timeframe volume to identify key market structure levels.
🔹 Visual Customization: Configure colors, line styles, transparency, and label formatting.
🔹 Automatic Ranking: Highlights the strongest to weakest levels using a color gradient.
🔹 Dynamic Updates: Levels adapt automatically as new bars form.
Inputs Overview
Lookback Bars: Number of historical bars used for analysis.
Price Bins: Defines the precision of volume distribution.
Number of Lines: How many key levels to display.
Min Volume %: Filters out less relevant low-volume bins.
Extend Lines: Choose how lines are projected into the future.
Use Higher Timeframe: Pull data from a higher timeframe for broader perspective.
How to Use
Apply the indicator to your chart and adjust the lookback period.
Optionally enable higher timeframe mode for more stable long-term zones.
Observe the horizontal lines — these represent volume-weighted support and resistance areas.
Combine with your existing tools for trend or momentum confirmation.
This tool helps visualize where market participation was strongest, giving traders a clearer view of potential reaction zones for both intraday and swing analysis.
It’s intended as a visual analytical aid, not a signal generator.
⚠️Disclaimer:
This script is provided for educational and informational purposes only. It is not financial advice and should not be considered a recommendation to buy, sell, or hold any financial instrument. Trading involves significant risk of loss and is not suitable for every investor. Users should perform their own due diligence and consult with a licensed financial advisor before making any trading decisions. The author does not guarantee any profits or results from using this script, and assumes no liability for any losses incurred. Use this script at your own risk.
Previous Day & Week High/Low LevelsPrevious Day & Week High/Low Levels is a precision tool designed to help traders easily identify the most relevant price levels that often act as strong support or resistance areas in the market. It automatically plots the previous day’s and week’s highs and lows, as well as the current day’s developing internal high and low. These levels are crucial reference points for intraday, swing, and even position traders who rely on price action and liquidity behavior.
Key Features
Previous Day High/Low:
The indicator automatically draws horizontal lines marking the highest and lowest prices from the previous trading day.
These levels are widely recognized as potential zones where the market may react again — either rejecting or breaking through them.
Previous Week High/Low:
The script also tracks and displays the high and low from the last completed trading week.
Weekly levels tend to represent stronger liquidity pools and broader institutional zones, which makes them especially important when aligning higher timeframe context with lower timeframe entries.
Internal Daily High/Low (Real-Time Tracking):
While the day progresses, the indicator dynamically updates the current day’s internal high and low.
This allows traders to visualize developing market structure, identify intraday ranges, and anticipate potential breakouts or liquidity sweeps.
Multi-Timeframe Consistency:
All levels — daily and weekly — remain visible across any chart timeframe, from 1 minute to 1 day or higher.
This ensures traders can maintain perspective and avoid losing track of key zones when switching views.
Customizable Visuals:
The colors, line thickness, and label visibility can be easily adjusted to match personal charting preferences.
This makes the indicator adaptable to any trading style or layout, whether minimalistic or detailed.
How to Use
Identify Key Reaction Zones:
Observe how price interacts with the previous day and week levels. Rejections, consolidations, or clean breakouts around these lines often signal strong liquidity areas or potential directional moves.
Combine with Market Structure or Liquidity Concepts:
The indicator works perfectly with supply and demand analysis, liquidity sweeps, order block strategies, or simply classic support/resistance techniques.
Scalping and Intraday Trading:
On lower timeframes (1m–15m), the daily levels help identify intraday turning points.
On higher timeframes (1h–4h or daily), the weekly levels provide broader context and directional bias.
Risk Management and Planning:
Using these levels as reference points allows for more precise stop placement, target setting, and overall trade management.
Why This Indicator Helps
Markets often react strongly around previous highs and lows because these zones contain trapped liquidity, pending orders, or institutional decision points.
By having these areas automatically mapped out, traders gain a clear and objective view of where price is likely to respond — without needing to manually draw lines every day or week.
Whether you’re a beginner still learning about price structure, or an advanced trader refining entries within liquidity zones, this tool simplifies the process and keeps your charts clean, consistent, and data-driven.
Jensen Alpha RS🧠 Jensen Alpha RS (J-Alpha RS)
Jensen Alpha RS is a quantitative performance evaluation tool designed to compare multiple assets against a benchmark using Jensen’s Alpha — a classic risk-adjusted return metric from modern portfolio theory.
It helps identify which assets have outperformed their benchmark on a risk-adjusted basis and ranks them in real time, with optional gating and visual tools. 📊
✨ Key Features
• 🧩 Multi-Asset Comparison: Evaluate up to four assets simultaneously.
• 🔀 Adaptive Benchmarking: TOTALES mode uses CRYPTOCAP:TOTALES (total crypto market cap ex-stablecoins). Dynamic mode automatically selects the strongest benchmark among BTC, ETH, and TOTALES based on rolling momentum.
• 📐 Jensen’s Alpha Calculation: Uses rolling covariance, variance, and beta to estimate α, showing how much each asset outperformed its benchmark.
• 📈 Z-Score & Consistency Metrics: Z-Score highlights statistical deviations in alpha; Consistency % shows how often α has been positive over a chosen window.
• 🚦 Trend & Zero Gates: Optional filters that require assets to be above EMA (trend) and/or have α > 0 for confirmation.
• 🏆 Leaders Board Table: Displays α, Z, Rank, Consistency %, and Gate ✓/✗ for all assets in a clear visual layout.
• 🔔 Dynamic Alerts: Get notified whenever the top alpha leader changes on confirmed (non-repainting) data.
• 🎨 Visual Enhancements: Smooth α with an SMA or color bars by the current top-performing asset.
🧭 Typical Use Cases
• 🔄 Portfolio Rotation & Relative Strength: Identify which assets consistently outperform their benchmark to optimize capital allocation.
• 🧮 Alpha Persistence Analysis: Gauge whether a trend’s performance advantage is statistically sustainable.
• 🌐 Market Regime Insight: Observe how asset leadership rotates as benchmarks shift across market cycles.
⚙️ Inputs Overview
• 📝 Assets (1–4): Select up to four tickers for evaluation.
• 🧭 Benchmark Mode: Choose between static TOTALES or Dynamic auto-selection.
• 📏 Alpha Settings: Adjustable lookback, smoothing, and consistency windows.
• 🚦 Gates: Optional trend and alpha filters to refine results.
• 🖥️ Display: Enable/disable table and customize colors.
• 🔔 Alerts: Toggle notifications on leadership changes.
🔎 Formula Basis
Jensen’s Alpha (α) is estimated as:
α = E − β × E
where β = Cov(Ra, Rb) / Var(Rb), and Ra/Rb represent asset and benchmark returns, respectively.
A positive α indicates outperformance relative to the risk-adjusted benchmark expectation. ✅
⚠️ Disclaimer
This script is for educational and analytical purposes only.
It is NOT a signal. 🚫📉
It does not constitute financial advice, trading signals, or investment recommendations. 💬
The author is not responsible for any financial losses or trading decisions made based on this indicator. 🙏
Always perform your own analysis and use proper risk management. 🛡️
Logit RSI [AdaptiveRSI]The traditional 0–100 RSI scale makes statistical overlays, such as Bollinger Bands or even moving averages, technically invalid. This script solves this issue by placing RSI on an unbounded, continuous scale, enabling these tools to work as intended.
The Logit function takes bounded data, such as RSI values ranging from 0 to 100, and maps them onto an unbounded scale ranging from negative infinity (−∞) to positive infinity (+∞).
An RSI reading of 50 becomes 0 on the Logit scale, indicating a balanced market. Readings above 50 map to positive Logit values (price above Wilder’s EMA / RSI above 50), while readings below 50 map to negative values (price below Wilder’s EMA / RSI below 50).
For the detailed formula, which calculates RSI as a scaled distance from Wilder’s EMA, check the RSI
: alternative derivation script.
The main issue with the 0–100 RSI scale is that different lookback periods produce very different distributions of RSI values. The histograms below illustrate how often RSIs of various lengths spend time within each 5-point range.
On RSI(2), the tallest bars appear at the edges (0–5 and 95–100), meaning short-term RSI spends most of its time at the extremes. For longer lookbacks, the bars cluster around the center and rarely reach 70 or 30.
This behavior makes it difficult to generalize the two most common RSI techniques:
Fixed 70/30 thresholds: These overbought and oversold levels only make sense for short- or mid-range lookbacks (around the low teens). For very short periods, RSI spends most of its time above or below these levels, while for long-term lookbacks, RSI rarely reaches them.
Bollinger Bands (±2 standard deviations): When applied directly to RSI, the bands often extend beyond the 0–100 limits (especially for short-term lookbacks) making them mathematically invalid. While the issue is less visible on longer settings, it remains conceptually incorrect.
To address this, we apply the Logit Transform :
Logit RSI = LN(RSI / (100 − RSI))
The transformed data fits a smooth bell-shaped curve, allowing statistical tools like Bollinger Bands to function properly for the first time.
Why Logit RSI Matters:
Makes RSI statistically consistent across all lookback periods.
Greatly improves the visual clarity of short-term RSIs
Allows proper use of volatility tools (like Bollinger Bands) on RSI.
Replaces arbitrary 70/30 levels with data-driven thresholds.
Simplifies RSI interpretation for both short- and long-term analysis.
INPUTS:
RSI Length — set the RSI lookback period used in calculations.
RSI Type — choose between Regular RSI or Logit RSI .
Plot Bollinger Bands — ON/OFF toggle to overlay statistical envelopes around RSI or Logit RSI.
SMA and Standard Deviation Length — defines the lookback period for both the SMA (Bollinger Bands midline) and Standard Deviation calculations.
Standard Deviation Multiplier — controls the width of the Bollinger Bands (e.g., 2.0 for ±2σ).
While simple, the Logit transformation represents an unexplored yet powerful mathematically grounded improvement to the classic RSI.
It offers traders a structured, intuitive, and statistically consistent way to use RSI across all timeframes.
I welcome your feedback, suggestions, and code improvements—especially regarding performance and efficiency. Your insights are greatly appreciated.
🚀 Ultimate Trading Tool + Strat Method🚀 Ultimate Trading Tool + Strat Method - Complete Breakdown
Let me give you a comprehensive overview of this powerful indicator!
🎯 What This Indicator Does:
This is a professional-grade, all-in-one trading system that combines two proven methodologies:
1️⃣ Technical Analysis System (Original)
Advanced trend detection using multiple EMAs
Momentum analysis with MACD
RSI multi-timeframe analysis
Volume surge detection
Automated trendline drawing
2️⃣ Strat Method (Pattern Recognition)
Inside bars, outside bars, directional bars
Classic patterns: 2-2, 1-2-2
Advanced patterns: 3-1-2, 2-1-2, F2→3
Timeframe continuity filters
📊 How It Generates Signals:
Technical Analysis Signals (Green/Red Triangles):
Buy Signal Triggers When:
✅ Price above EMA 21 & 50 (uptrend)
✅ MACD histogram rising (momentum)
✅ RSI between 30-70 (not overbought/oversold)
✅ Volume surge above 20-period average
✅ Price breaks above resistance trendline
Scoring System:
Trend alignment: +1 point
Momentum: +1 point
RSI favorable: +1 point
Trendline breakout: +2 points
Minimum score required based on sensitivity setting
Strat Method Signals (Blue/Orange Labels):
Pattern Recognition:
2-2 Setup: Down bar → Up bar (or reverse)
1-2-2 Setup: Inside bar → Down bar → Up bar
3-1-2 Setup: Outside bar → Inside bar → Up bar
2-1-2 Setup: Down bar → Inside bar → Up bar
F2→3 Setup: Failed directional bar becomes outside bar
Confirmation Required:
Must break previous bar's high (buy) or low (sell)
Optional timeframe continuity (daily & weekly aligned)
💰 Risk Management Features:
Dynamic Stop Loss & Take Profit:
ATR-Based: Adapts to market volatility
Stop Loss: Entry - (ATR × 1.5) by default
Take Profit: Entry + (ATR × 3.0) by default
Risk:Reward: Customizable 1:2 to 1:5 ratios
Visual Risk Zones:
Colored boxes show risk/reward area
Dark, bold lines for easy identification
Clear entry, stop, and target levels
🎨 What You See On Screen:
Main Signals:
🟢 Green Triangle "BUY" - Technical analysis long signal
🔴 Red Triangle "SELL" - Technical analysis short signal
🎯 Blue Label "STRAT" - Strat method long signal
🎯 Orange Label "STRAT" - Strat method short signal
Trendlines:
Green lines - Support trendlines (bullish)
Red lines - Resistance trendlines (bearish)
Automatically drawn from pivot points
Extended forward to predict future levels
Stop/Target Levels:
Bold crosses at stop loss levels (red color)
Bold crosses at take profit levels (green color)
Line width = 3 for maximum visibility
Trade Zones:
Light green boxes - Long trade risk/reward zone
Light red boxes - Short trade risk/reward zone
Shows potential profit vs risk visually
📊 Information Dashboard (Top Right):
Shows real-time market conditions:
Main Signal: Current technical signal status
Strat Method: Active Strat pattern
Trend: Bullish/Bearish/Neutral
Momentum: Strong/Weak based on MACD
Volume: High/Normal compared to average
TF Continuity: Daily/Weekly alignment
RSI: Current RSI value with color coding
Support/Resistance: Current trendline levels
🔔 Alert System:
Entry Alerts:
Technical Signals:
🚀 BUY SIGNAL TRIGGERED!
Type: Technical Analysis
Entry: 45.23
Stop: 43.87
Target: 48.95
```
**Strat Signals:**
```
🎯 STRAT BUY TRIGGER!
Pattern: 3-1-2
Entry: 45.23
Trigger Level: 44.56
Exit Alerts:
Target hit notifications
Stop loss hit warnings
Helps maintain discipline
⚙️ Customization Options:
Signal Settings:
Sensitivity: High/Medium/Low (controls how many signals)
Volume Filter: Require volume surge or not
Momentum Filter: Require momentum confirmation
Strat Settings:
TF Continuity: Require daily/weekly alignment
Pattern Selection: Enable/disable specific patterns
Confirmation Mode: Show only confirmed triggers
Risk Settings:
ATR Multiplier: Adjust stop/target distance
Risk:Reward: Set preferred ratio
Visual Elements: Show/hide any component
Visual Settings:
Colors: Customize all signal colors
Display Options: Toggle signals, levels, zones
Trendline Length: Adjust pivot detection period
🎯 Best Use Cases:
Day Trading:
Use low sensitivity setting
Enable all Strat patterns
Watch for high volume signals
Quick in/out trades
Swing Trading:
Use medium sensitivity
Require timeframe continuity
Focus on trendline breakouts
Hold for target levels
Position Trading:
Use high sensitivity (fewer signals)
Require strong momentum
Focus on weekly/daily alignment
Larger ATR multipliers
💡 Trading Strategy Tips:
High-Probability Setups:
Double Confirmation: Technical + Strat signal together
Trend Alignment: All timeframes agree
Volume Surge: Institutional participation
Trendline Break: Clear level breakout
Risk Management:
Always use stops - System provides them
Position sizing - Risk 1-2% per trade
Don't chase - Wait for signal confirmation
Take profits - System provides targets
What Makes Signals Strong:
✅ Both technical AND Strat signals fire together
✅ Timeframe continuity (daily & weekly aligned)
✅ Volume surge confirms institutional interest
✅ Multiple indicators align (trend + momentum + RSI)
✅ Clean trendline breakout with no resistance above (or support below)
⚠️ Common Mistakes to Avoid:
Don't ignore stops - System calculates them for a reason
Don't overtrade - Wait for quality setups
Don't disable volume filter - Unless you know what you're doing
Don't use max sensitivity - You'll get too many signals
Don't ignore timeframe continuity - It filters bad trades
🚀 Why This Indicator is Powerful:
Combines Multiple Edge Sources:
Technical analysis (trend, momentum, volume)
Pattern recognition (Strat method)
Risk management (dynamic stops/targets)
Market structure (trendlines, support/resistance)
Professional Features:
No repainting - signals are final when bar closes
Clear risk/reward before entry
Multiple confirmation layers
Adaptable to any market or timeframe
Beginner Friendly:
Clear visual signals
Automatic calculations
Built-in risk management
Comprehensive dashboard
This indicator essentially gives you everything a professional trader uses - trend analysis, momentum, patterns, volume, risk management - all in one clean package!
Any specific aspect you'd like me to explain in more detail? 🎯RetryClaude can make mistakes. Please double-check responses. Sonnet 4.5
HTF Fibonacci on intraday ChartThis indicator plots Higher Timeframe (HTF) Fibonacci retracement levels directly on your intraday chart, allowing you to visualize how the current price action reacts to key retracement zones derived from the higher timeframe trend.
Concept
Fibonacci retracement levels are powerful tools used to identify potential support and resistance zones within a price trend.
However, these levels are often calculated on a higher timeframe (like Daily or Weekly), while most traders execute entries on lower timeframes (like 15m, 30m, or 1H).
This indicator bridges that gap — it projects the higher timeframe’s Fibonacci levels onto your current intraday chart, helping you see where institutional reactions or swing pivots might occur in real time.
How It Works
Select the Higher Timeframe (HTF)
You can choose which higher timeframe the Fibonacci structure is derived from — default is Daily.
Define the Lookback Period
The script looks back over the chosen number of bars on the higher timeframe to find the highest high and lowest low — the base for Fibonacci calculations.
Plots Key Fibonacci Levels Automatically:
0% (Low)
23.6%
38.2%
50.0%
61.8%
78.6%
100% (High)
Dynamic Labels
Each Fibonacci level is labelled on the latest bar, updating in real time as new data forms on the higher timeframe.
Best Used For
Intraday traders who want to align lower-timeframe entries with higher-timeframe structure.
Swing traders confirming price reactions around major Fibonacci retracement zones.
Contextual analysis for pullback entries, breakout confirmations, or retests of key levels.
Recommended Settings
Higher Timeframe: Daily (for intraday analysis)
Lookback: 50 bars (adjust based on volatility)
Combine with MACD, RSI, CPR, or Pivots for confluence.
License & Credits
Created and published for educational and analytical purposes.
Inspired by standard Fibonacci analysis practices.
CMF, RSI, CCI, MACD, OBV, Fisher, Stoch RSI, ADX (+DI/-DI)
Stoch RSINine indicators in one, CMF, RSI, CCI, MACD, OBV, Fisher, Stoch RSI, ADX (+DI/-DI) You can use whichever of the nine indicators you want. I use CFM, CCI, MACD, Stoch RSI.
SMA 10/20 Here are two simple moving averages that can help you see the underlying trend. These are the moving averages used by the famous trader Qullamagie
CQ_(2)_Fibonacci IntraWeek Range [UkutaLabs]//█ OVERVIEW
//
//The Fibonacci Intraweek Period Range Indicator is a powerful trading tool that draws levels of support and resistance that are based on key
//Fibonacci levels.
//█ OVERVIEW
//
//The Fibonacci Intramonth Period Range Indicator is a powerful trading tool that draws levels of support and resistance that are based on key
//Fibonacci levels. Created by © UkutaLabs and modified by me to include a progress gauge. The script will identify the high and low of a range
//that is specified by the user, then draw several levels of support and resistance based on Fibonacci levels.
//
//The script will also draw extension levels outside of the specified range that are also based on Fibonacci levels. These extension
//levels can be turned off in the indicator settings.
//
//Each level is also labelled to help traders understand what each line represents. These labels can be turned off in the indicator
//settings.
//
//The purpose of this script is to simplify the trading experience of users by giving them the ability to customize the time period
//that is identified, then draw levels of support and resistance that are based on the price action during this time.
//
//█ USAGE
//
//In the indicator settings, the user has access to a setting called Session Range. This gives users control over the range that will
//be used.
//
//The script will then identify the high and low of the range that was specified and draw several levels of support and resistance based
//on Fibonacci levels between this range. The user can also choose to have extension levels that display more levels outside of the range.
//
//█ SETTINGS
//
//Configuration
//
//• Display Mode: Determines the number of days that will be displayed by the script.
//• Show Labels: Determines whether or not identifying labels will be displayed on each line.
//• Font Size: Determines the text size of labels.
//• Label Position: Determines the justification of labels.
//• Extension Levels: Determines whether or not extension levels will be drawn outside of the high and low of the specified range.
//
//Session
//
//• Session Range: Determines the time period that will be used for calculations.
//• Timezone Offset (+/-): Determines how many hours the session should be offset by.
//support and resistance based on Fibonacci levels.
//
//The script will also draw extension levels outside of the specified range that are also based on Fibonacci levels. These extension
//levels can be turned off in the indicator settings.
//
//Each level is also labelled to help traders understand what each line represents. These labels can be turned off in the indicator
//settings.
//
//The purpose of this script is to simplify the trading experience of users by giving them the ability to customize the time period
//that is identified, then draw levels of support and resistance that are based on the price action during this time.
//
//█ USAGE
//
//In the indicator settings, the user has access to a setting called Session Range. This gives users control over the range that will
//be used.
//
//The script will then identify the high and low of the range that was specified and draw several levels of support and resistance based
//on Fibonacci levels between this range. The user can also choose to have extension levels that display more levels outside of the range.
//
//█ SETTINGS
//
//Configuration
//
//• Display Mode: Determines the number of days that will be displayed by the script.
//• Show Labels: Determines whether or not identifying labels will be displayed on each line.
//• Font Size: Determines the text size of labels.
//• Label Position: Determines the justification of labels.
//• Extension Levels: Determines whether or not extension levels will be drawn outside of the high and low of the specified range.
//
//Session
//
//• Session Range: Determines the time period that will be used for calculations.
//• Timezone Offset (+/-): Determines how many hours the session should be offset by.
CQ_Fibonacci IntraMonth Range [UkutaLabs]//█ OVERVIEW
//
//The Fibonacci Intramonth Period Range Indicator is a powerful trading tool that draws levels of support and resistance that are based on key
//Fibonacci levels. Created by © UkutaLabs and modified by me to include a progress gauge. The script will identify the high and low of a range
//that is specified by the user, then draw several levels of support and resistance based on Fibonacci levels.
//
//The script will also draw extension levels outside of the specified range that are also based on Fibonacci levels. These extension
//levels can be turned off in the indicator settings.
//
//Each level is also labelled to help traders understand what each line represents. These labels can be turned off in the indicator
//settings.
//
//The purpose of this script is to simplify the trading experience of users by giving them the ability to customize the time period
//that is identified, then draw levels of support and resistance that are based on the price action during this time.
//
//█ USAGE
//
//In the indicator settings, the user has access to a setting called Session Range. This gives users control over the range that will
//be used.
//
//The script will then identify the high and low of the range that was specified and draw several levels of support and resistance based
//on Fibonacci levels between this range. The user can also choose to have extension levels that display more levels outside of the range.
//
//█ SETTINGS
//
//Configuration
//
//• Display Mode: Determines the number of days that will be displayed by the script.
//• Show Labels: Determines whether or not identifying labels will be displayed on each line.
//• Font Size: Determines the text size of labels.
//• Label Position: Determines the justification of labels.
//• Extension Levels: Determines whether or not extension levels will be drawn outside of the high and low of the specified range.
//
//Session
//
//• Session Range: Determines the time period that will be used for calculations.
//• Timezone Offset (+/-): Determines how many hours the session should be offset by.
CQ_Fibonacci IntraDay Range [UkutaLabs]//█ OVERVIEW
//
//The "Fibonacci Intraday Period Range Indicator" is a powerful trading tool that draws levels of support and resistance that are based on key
//Fibonacci levels. Created by © UkutaLabs and modified by me to include a progress gauge. The script will identify the high and low
//of a range that is specified by the user, then draw several levels of support and resistance based on Fibonacci levels.
//
//The script will also draw extension levels outside of the specified range that are also based on Fibonacci levels. These extension
//levels can be turned off in the indicator settings.
//
//Each level is also labelled to help traders understand what each line represents. These labels can be turned off in the indicator
//settings.
//
//The purpose of this script is to simplify the trading experience of users by giving them the ability to customize the time period
//that is identified, then draw levels of support and resistance that are based on the price action during this time.
//
//█ USAGE
//
//In the indicator settings, the user has access to a setting called Session Range. This gives users control over the range that will
//be used.
//
//The script will then identify the high and low of the range that was specified and draw several levels of support and resistance based
//on Fibonacci levels between this range. The user can also choose to have extension levels that display more levels outside of the range.
//
//These lines will extend until the end of the current trading day at 5:00 pm EST.
//
//█ SETTINGS
//
//Configuration
//
//• Display Mode: Determines the number of days that will be displayed by the script.
//• Show Labels: Determines whether or not identifying labels will be displayed on each line.
//• Font Size: Determines the text size of labels.
//• Label Position: Determines the justification of labels.
//• Extension Levels: Determines whether or not extension levels will be drawn outside of the high and low of the specified range.
//
//Session
//
//• Session Range: Determines the time period that will be used for calculations.
//• Timezone Offset (+/-): Determines how many hours the session should be offset by.
Lakshman Rekha [CSN]Description:
Lakshman Rekha is a powerful and intelligently designed indicator that automatically identifies Support and Resistance levels using advanced mathematical algorithms based on the Gann Fortune methodology. It dynamically calculates and plots Daily, Weekly, Monthly, and Yearly levels to help traders recognize crucial price zones, potential reversal areas, and breakout points with exceptional accuracy.
This indicator seamlessly integrates the Gann Fortune Algorithm with the Relative Strength Index (RSI) and the Simple Moving Average (SMA) to deliver a well-structured and reliable trading system.
It uses the following configurations on a 5-minute timeframe:
SMA (14-period)
RSI (10-period)
Trading Approach:
In Nifty, traders are advised to book profits after a 60-point move or apply a trailing stop to capture extended trends.
In Bank Nifty, the recommended target or trailing level is 100 points for optimal trade management.
Lakshman Rekha offers traders a balanced combination of algorithmic precision, technical confluence, and price-action reliability.
We are providing free access to this indicator, allowing users to test, experience, and contribute valuable insights to enhance its performance.
This indicator is ideally suited for intraday and short-term swing traders seeking a systematic approach that blends mathematical structure, momentum analysis, and trend confirmation for consistent trading outcomes.
SST Table ShekharSST Table Shekhar — v6.10.2
A compact, movable table that displays up to 20 symbols per group (Group A / Group B), shows current price (CMP), previous 20-day high (OLD GTT), current 20-day high (NEW GTT) and an UPDATE flag when NEW GTT < OLD GTT. Adds SMA20 on-chart, with an optional daily closing-basis alert for CMP crossing above SMA20. Designed for daily timeframe usage and efficient multi-symbol monitoring.
Key features
Two symbol groups (Group A / Group B), each up to 20 tickers — switch between groups without editing text fields.
Clean, transparent, movable table: STOCK | CMP | OLD GTT | NEW GTT | UPDATE.
Correct per-symbol OLD GTT (previous bar’s 20-day high) using a single request.security() call per symbol (optimized under TradingView limits).
SMA20 plotted on the chart (blue line).
Toggleable plots: HIGH20 / LOW20 / TARGET for the active chart symbol.
Alternate row shading and header background selector; font size selector.
Alerts:
Update GTT — when NEW 20D HIGH < OLD 20D HIGH (aggregated list).
CMP Cross Above SMA20 (closing basis) — when symbol closes above its SMA20 (uses previous close & previous SMA20 for closing-basis detection).
Alert messages list all symbols that triggered in the active group and include the group name.
Robust parser for input symbol lists — handles commas, semicolons, pipes, newlines and trims empty entries.
Inputs (exposed)
20-Day High/Low Length — period for HIGH/LOW (default 20).
Target % — percent used to compute target (optional plotted).
Group A / Group B — comma-separated lists of tickers (blank by default).
Show Which Group? — select Group A or Group B for display.
Table Corner — position (Top Left / Top Right / Bottom Left / Bottom Right).
Font Size — Small / Normal / Large.
Header Background — Transparent / Silver / Blue / Green / Yellow.
Show HIGH20/LOW20/TARGET Plots — toggle plotting of those lines for the chart symbol.
Alternate Row Shading & opacity.
Enable Update GTT Alert & Alert Only On Bar Close toggle.
Enable CMP Cross Above SMA20 Alert & Cross Only On Bar Close toggle.
Alerts / How to use
Put the script on a chart (recommended timeframe: 1D for reliable closing-basis cross signals).
Populate Group A and/or Group B with up to 20 tickers each (comma-separated). Leave blank to start fresh.
In the indicator’s Inputs, choose which group to view with Show Which Group?.
To create a TradingView alert:
Click the Alarm icon → Add alert.
Condition: choose either the alertcondition lines exposed by the script:
SST Table Shekhar v6.10.2 → Update GTT (any symbol)
SST Table Shekhar v6.10.2 → CMP Cross Above SMA20 (any symbol)
Or choose Any alert() function call if you want the script’s internal alert() messages (aggregated).
Set Options to Once per bar close if you want alerts only at bar close (recommended for daily timeframe), or Once per bar for intrabar.
Choose delivery channels: pop-up, app, email, webhook (webhook recommended for automation).
Alert messages include ticker lists (e.g. Update GTT = YES for: NSE:TCS, NSE:RELIANCE — (Group A)).
Practical examples
Use Group A for your core watchlist, Group B for a secondary watchlist; toggle groups to change the displayed list.
Keep chart on daily timeframe and enable Cross Alert Only On Bar Close for accurate closing-basis signals.
Use webhook alerts to push signals to Google Sheets, Discord/Telegram, or a trading automation system.
Performance & limits
Each symbol uses one request.security() call returning a tuple — optimized to stay below TradingView’s 40 unique-request limit.
Designed for up to 20 symbols per group (40 total), but running both groups simultaneously (40 requests) may approach limits depending on other indicators on your chart. Keep it to 20 per instance for best stability.
Works best on 1D / 4H / 1H timeframes. On very low intraday timeframes (1–5 min) you may see heavier resource usage — reduce number of symbols or plots if needed.
Known limitations
Alerts are aggregated (single alert lists all matching tickers). If you need individual per-symbol alerts you can create separate script instances or ask for per-symbol alert logic.
Only the CMP Cross Above SMA20 (closing basis) is included in this release. If you want downward crosses (CMP crosses below SMA20) or more complex rules (volume filter, RSI, etc.), I can add those.
Changelog
v6.10.2 — stable publish candidate: Group A/B, 20 symbols, robust parser, SMA20 cross alerts, optimized single-request per symbol, UI/appearance options, alert messages.
(previous dev notes kept internally)
Permissions & licensing
You may publish and redistribute this script on TradingView. If you republish code derived from this indicator, please keep author credit as Shekhar / SST Table Shekhar and note any modifications.
This script is provided as-is. Not financial advice. Use at your own risk.
Support / Contact
For feature requests, bug reports, or help configuring alerts/webhooks (Discord/GSheets/Telegram) — message me in the TradingView script comments or reply to this post.
ICT 1st Presented FVG After RTH OpenICT 1st Presented FVG After RTH Open
Overview
This indicator identifies and tracks the first Fair Value Gap (FVG) that forms after the Regular Trading Hours (RTH) open, based on Inner Circle Trader (ICT) concepts. It monitors price behavior and reaction to this initial FVG throughout the trading session.
Key Features
📊 Smart FVG Detection
• Automatically identifies the first valid FVG after RTH open (default: 9:30-10:00 AM ET)
• Filters noise using ATR-based minimum gap size validation
• Option to display all FVGs or just the first one
• Visual distinction between the first FVG and subsequent ones
⏰ Customizable Time Settings
• Adjustable RTH window (default: 9:30-10:00 AM)
• Multiple timezone support (New York, Chicago, London, Tokyo)
• Flexible tracking duration and sampling intervals
📈 Price Reaction Tracking
• Monitors price behavior relative to the first FVG over time
• Tracks whether price remains above, below, or inside the FVG zone
• Records price distance from FVG boundaries
• Displays real-time data in an easy-to-read table
• Volume tracking at each sample interval
🎨 Visual Elements
• Color-coded FVG boxes (green for bullish, red for bearish)
• Timestamp labels showing when each FVG formed
• Extendable boxes to track ongoing validity
• Optional background highlighting during RTH window
• Customizable table positions and display options
🔔 Alert System
• Visual markers on chart for easy backtesting
• Real-time programmatic alerts with detailed FVG information
• TradingView alert conditions for custom notifications
• Alerts include price range, gap size, and timestamp
Settings
Time Configuration:
• Timezone selection
• RTH start/end times
• Tracking duration (default: 120 minutes)
• Sample interval (default: 5 minutes)
FVG Validation:
• ATR length for gap size calculation
• Minimum gap size as ATR percentage
• Option to show all valid FVGs
Display Options:
• Custom colors for bullish/bearish FVGs
• Label visibility toggle
• Box extension options
• Maximum historical FVGs to display
• Info and reaction table positions
Use Cases
1. Entry Timing: Use the first FVG as a potential entry zone when price returns to fill the gap
2. Trend Confirmation: Monitor whether price respects or violates the first FVG
3. Session Analysis: Track how the first inefficiency of the session plays out over time
4. Backtesting: Visual markers allow easy historical analysis of FVG behavior
How It Works
The indicator waits for RTH to begin, then identifies the first three-candle pattern that creates a valid Fair Value Gap. Once detected, it:
1. Marks the FVG zone with a colored box
2. Begins tracking price position at regular intervals
3. Records data in a reaction table showing price behavior over time
4. Continues monitoring until the tracking duration expires or a new trading day begins
Notes
• Resets daily to track each session independently
• Works on any timeframe, though lower timeframes (1-5 min) are recommended for intraday FVG detection
• The "first presented" FVG concept emphasizes the importance of the initial inefficiency created after market open
• Historical FVGs are preserved up to the display limit for reference
This indicator is designed for traders familiar with ICT concepts and Fair Value Gap trading strategies. It combines automated detection with comprehensive tracking to help identify high-probability trading opportunities.
Colocar Ordens Fácil!This eases the process of creating limit orders on Trading View, when using the smarphone.
For that, the user inputs the given price range, the desired fibonacci entry level, and trade direction. The tools gives visual snap-to objects that can be used to lock long/short position tools, from which the option "create limit order" can be used to directly create the orders.
OB breakerOB Breaker
OB breaker is a system designed to trade either order blocks or breaker blocks (the opposite of the order block) as they are formed. The system detects order blocks through a very specific candle pattern to identify the order block zone. It then executes trades on either the creation of the order block or a re-test of the order block/breaker zone, whichever the user chooses.
Methodology & Core Concepts
Order blocks are formed on an ongoing basis, but they carry more weight when formed at extremes. The OB breaker will utilize a London session period defined by the user to begin drawing the order blocks and if the order blocks have not been breached, they will carry into the trade execution session and remain there until they are either destroyed or to the next London session start time where they will reset for the new day.
The London session begins drawing order blocks as defined. The pink and blue arrows represent areas where a potential order block may form based on the logic of the order block. A candle must have a wick high with a strong reversal for the order block to be created. If an order block is not destroyed, it will extend into the trade execution period.
Once an order block is created, it can trade off of the creation of the order block or on a re-test of the order block. Whichever is chosen.
Features And How They Work
When the “original" (disabled breaker) is checked, the strategy will look to take longs out of bullish order blocks and shorts out of bearish order blocks. When this is unchecked, it will trade on “breakers.” It will look to go long on the break of a bearish order block and short on the break of a bullish order block.
How the defined London Session Works
A user can set the London session start and end time to any trade window for the strategy to begin drawing new order blocks. If an order block is not destroyed it will carry into the trade execution time window. All order blocks are reset at the beginning of the next London session
Order Block Entries
Enter on OB creation or Re-test - When this is checked, the strategy will look to take a trade on the re-test of the order block
Entry Adjustment on Ticks - If using the entry on re-test, one can define how deep into the order block the strategy should enter on the re-test. “0” would be right at the order block line “-10” would be 10 ticks inside the order block.
If the Enter on OB creation or Re-test - is unchecked, the strategy will simply enter on the creation of the order block on candle close and not on the re-test
Trade Management
User can choose how many trades to execute within a trading window
Stop Loss
A user can choose a fixed stop, or the dynamic order block. The dynamic order block stop will simply be a stop blacked at the top or bottom of the order block.
Ticks extending beyond the stop loss
If a user is using a dynamic stop, they can adjust this to move the stop x value to a fixed point of ticks over or under the dynamic order block
Users can set the stop and break even to any tick value.
Enabling the trailing stop, a user can set the strategy at a tick value to begin trailing and then an offset value to trail by
Enabling the move to break even moves the stop to break even after the defined tick value
Take profit levels can be defined by a tick value, or a risk to reward value.
Force Session To Close Only End Matters
Defines the time period a user would like all positions to be flattened regardless if a tp or stop was hit.
Force Close At Session End
Flattens all positions at the end of the NY session
Enable Multiple Take Profits
A user can define the specific tick values to take profits at up to 3 different areas.
Disclaimer
This script is for educational and informational purposes only. It does not provide financial advice, and past performance does not guarantee future results. Trading carries risk, and all decisions are your responsibility. Redistribution or unauthorized use is strictly prohibited.
ICT Multi-Timeframe FVG & Order Flow SuiteICT Multi-Timeframe FVG & Order Flow Suite
A comprehensive Inner Circle Trader (ICT) analysis tool that combines multiple timeframes, Fair Value Gap detection, order flow tracking, and smart money concepts into one powerful indicator.
🎯 Key Features
Higher Timeframe FVG Detection
Simultaneously tracks FVGs across 4H, Daily, Weekly, and Monthly timeframes
Visual differentiation between active and mitigated HTF FVGs
BAG (Breaker And Gap) identification
Intelligent filtering system to align with HTF bias
Real-time status table showing current HTF FVG states
Current Timeframe Analysis
Automatic bullish/bearish FVG detection
2CR (2 Candle Reversal) tracking with visual markers
Mitigation monitoring with color-coded states
Customizable display limits and filtering options
Order Flow Legs
Dynamic order flow box highlighting price expansion
50% equilibrium level marking
Smart locking mechanism based on FVG mitigation
Real-time updates as price extends
ITH/ITL Pivot System
Intermediate Term High/Low detection
Run vs Sweep identification with directional labels
Mitigated and unmitigated level tracking
Visual distinction between respected and disrespected levels
Advanced Filtering
Hide opposing timeframe FVGs based on HTF bias
Filter current TF FVGs by type (bullish/bearish)
"Last Mitigated Only" mode to reduce chart clutter
Customizable maximum display limits per timeframe
📈 What Makes This Different?
Multi-Timeframe Integration: See how HTF FVGs align with your trading timeframe in real-time
Smart Bias Detection: Automatically determines market bias from highest to lowest enabled timeframe
Comprehensive Alerts: 12 distinct alert conditions covering FVG creation, mitigation, 2CR events, and pivot breaches
Professional Visualization: Clean, customizable colors and styles with minimal chart clutter
Status Dashboard: Quick-reference table showing the state of all tracked HTF FVGs
⚙️ Customization Options
Individual toggle controls for each HTF
Adjustable colors for bullish, bearish, active, and mitigated states
Boundary lines, origin markers, and mitigation lines
Configurable label sizes and positions
Line extension controls
Optional EMA overlay
🔔 Alert System
Set alerts for:
New FVG creation (bullish/bearish)
FVG mitigation events
2CR respect/disrespect
ITH/ITL runs and sweeps
💡 Best Practices
Start with Daily/Weekly HTF FVGs to identify overall bias
Use filtering to focus on trade direction aligned with HTF
Monitor 2CR events for confirmation of price acceptance/rejection
Combine with order flow legs to identify high-probability setups
Use the status table for quick multi-timeframe analysis
📚 Suitable For
ICT methodology traders
Smart Money Concept (SMC) practitioners
Multi-timeframe analysts
Swing and intraday traders
Anyone seeking institutional order flow insights
Note: This indicator is designed for educational purposes and works best when combined with proper risk management and additional confirmation methods. Understanding ICT concepts is recommended for optimal use.
Too many secretsTOO MANY SECRETS - Extreme Condition Signal Detector
This indicator identifies extreme market conditions and provides clear TOP and BOTTOM signals when specific criteria are met. Designed for traders who want reliable entry points without the noise.
KEY FEATURES:
No Repaint - Once a signal prints, it's locked in and will not disappear or change
Smart Filtering - The Blackbox and other proprietary modules prevent signal spam, ensuring only high-quality setups trigger alerts
Customizable Alerts - Use as a multi-symbol screener across different timeframes
Visual Strike Lines - Optional vertical lines mark exact signal locations with adjustable transparency
Clean Interface - Minimal chart clutter with maximum information
CLASSIFIED METHODOLOGY:
The internal workings of this indicator, including the Blackbox module and other signal processing components, are intentionally classified. The specific calculations, timeframes, and confluence requirements remain undisclosed.
RECOMMENDED USAGE:
Best viewed on 5 minute charts
Configure alerts to monitor multiple symbols simultaneously
Adjustable Blackbox parameter allows fine-tuning for your trading style
IMPORTANT NOTES:
Bar Replay: Signals only appear on 5x or faster speeds during replay. In live trading, signals appear instantly in real-time.
This is highly experimental. Not financial advice - trade at your own risk.
WHAT YOU GET:
TOP signals (red triangles) for potential bearish reversals
BOTTOM signals (green triangles) for potential bullish reversals
Alert conditions for automated notifications
Splash screen with setup guidance (can be toggled off)
ALISH WEEK LABELS THE ALISH WEEK LABELS
Overview
This indicator programmatically delineates each trading week and encapsulates its realized price range in a live-updating, filled rectangle. A week is defined in America/Toronto time from Monday 00:00 to Friday 16:00. Weekly market open to market close, For every week, the script draws:
a vertical start line at the first bar of Monday 00:00,
a vertical end line at the first bar at/after Friday 16:00, and
a white, semi-transparent box whose top tracks the highest price and whose bottom tracks the lowest price observed between those two temporal boundaries.
The drawing is timeframe-agnostic (M1 → 1D): the box expands in real time while the week is open and freezes at the close boundary.
Time Reference and Session Boundaries
All scheduling decisions are computed with time functions called using the fixed timezone string "America/Toronto", ensuring correct behavior across DST transitions without relying on chart timezone. The start condition is met at the first bar where (dayofweek == Monday && hour == 0 && minute == 0); on higher timeframes where an exact 00:00 bar may not exist, a fallback checks for the first Monday bar using ta.change(dayofweek). The close condition is met on the first bar at or after Friday 16:00 (Toronto), which guarantees deterministic closure on intraday and higher timeframes.
State Model
The indicator maintains minimal persistent state using var globals:
week_open (bool): whether the current weekly session is active.
wk_hi / wk_lo (float): rolling extrema for the active week.
wk_box (box): the graphical rectangle spanning × .
wk_start_line and a transient wk_end_line (line): vertical delimiters at the week’s start and end.
Two dynamic arrays (boxes, vlines) store object handles to support bounded history and deterministic garbage collection.
Update Cycle (Per Bar)
On each bar the script executes the following pipeline:
Start Check: If no week is open and the start condition is satisfied, instantiate wk_box anchored at the current bar_index, prime wk_hi/wk_lo with the bar’s high/low, create the start line, and push both handles to their arrays.
Accrual (while week_open): Update wk_hi/wk_lo using math.max/min with current bar extremes. Propagate those values to the active wk_box via box.set_top/bottom and slide box.set_right to the current bar_index to keep the box flush with live price.
Close Check: If at/after Friday 16:00, finalize the week by freezing the right edge (box.set_right), drawing the end line, pushing its handle, and flipping week_open false.
Retention Pruning: Enforce a hard cap on historical elements by deleting the oldest objects when counts exceed configured limits.
Drawing Semantics
The range container is a filled white rectangle (bgcolor = color.new(color.white, 100 − opacity)), with a solid white border for clear contrast on dark or light themes. Start/end boundaries are full-height vertical white lines (y1=+1e10, y2=−1e10) to guarantee visibility across auto-scaled y-axes. This approach avoids reliance on price-dependent anchors for the lines and is robust to large volatility spikes.
Multi-Timeframe Behavior
Because session logic is driven by wall-clock time in the Toronto zone, the indicator remains consistent across chart resolutions. On coarse timeframes where an exact boundary bar might not exist, the script legally approximates by triggering on the first available bar within or immediately after the boundary (e.g., Friday 16:00 occurs between two 4-hour bars). The box therefore represents the true realized high/low of the bars present in that timeframe, which is the correct visual for that resolution.
Inputs and Defaults
Weeks to keep (show_weeks_back): integer, default 40. Controls retention of historical boxes/lines to avoid UI clutter and resource overhead.
Fill opacity (fill_opacity): integer 0–100, default 88. Controls how solid the white fill appears; border color is fixed pure white for crisp edges.
Time zone is intentionally fixed to "America/Toronto" to match the strategy definition and maintain consistent historical backtesting.
Performance and Limits
Objects are reused only within a week; upon closure, handles are stored and later purged when history limits are exceeded. The script sets generous but safe caps (max_boxes_count/max_lines_count) to accommodate 40 weeks while preserving Editor constraints. Per-bar work is O(1), and pruning loops are bounded by the configured history length, keeping runtime predictable on long histories.
Edge Cases and Guarantees
DST Transitions: Using a fixed IANA time zone ensures Friday 16:00 and Monday 00:00 boundaries shift correctly when DST changes in Toronto.
Weekend Gaps/Holidays: If the market lacks bars exactly at boundaries, the nearest subsequent bar triggers the start/close logic; range statistics still reflect observed prices.
Live vs Historical: During live sessions the box edge advances every bar; when replaying history or backtesting, the same rules apply deterministically.
Scope (Intentional Simplicity)
This tool is strictly a visual framing indicator. It does not compute labels, statistics, alerts, or extended S/R projections. Its single responsibility is to clearly present the week’s realized range in the Toronto session window so you can layer your own execution or analytics on top.