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
Metallic Retracement LevelsThere's something that's always bothered me about how traders use Fibonacci retracements. Everyone treats the golden ratio like it's the only game in town, but mathematically speaking, it's completely arbitrary. The golden ratio is just the first member of an infinite family of metallic means, and there's no particular reason why 1.618 should be special for markets when we have the silver ratio at 2.414, the bronze ratio at 3.303, and literally every other metallic mean extending to infinity. We just picked one and decided it was magical.
The metallic means are a sequence of mathematical constants that generalize the golden ratio. They're defined by the equation x² = kx + 1, where k is any positive integer. When k equals 1, you get the golden ratio. When k equals 2, you get the silver ratio. When k equals 3, you get bronze, and so on forever. Each metallic mean generates its own set of ratios through successive powers, just like how the golden ratio gives you 0.618, 0.382, 0.236 and so forth. The silver ratio produces a completely different set of retracement levels, as does bronze, as does any arbitrary metallic number you want to choose.
This indicator calculates these metallic means using the standard alpha and beta formulas. For any metallic number k, alpha equals (k + sqrt(k² + 4)) / 2, and we generate retracement ratios by raising alpha to various negative powers. The script algorithmically generates these levels instead of hardcoding them, which is how it should have been done from the start. It's genuinely silly that most fib tools just hardcode the ratios when the math to generate them is straightforward. Even worse, traditional fib retracements use 0.5 as a level, which isn't even a fibonacci ratio. It's just thrown in there because it seems like it should be important.
The indicator works by first detecting swing points using the Sylvain Zig-Zag . The zig-zag identifies significant price swings by combining percentage change with ATR adjustments, filtering out noise and connecting major pivot points. This is what drives the retracement levels. Once a new swing is confirmed, the script calculates the range between the last two pivot points and generates metallic retracement levels from the most recent swing low or high.
You can adjust which metallic number to use (golden, silver, bronze, or any positive integer), control how many power ratios to display above and below the 1.0 level, and set how many complete retracement cycles you want drawn. The levels extend from the swing point and show you where price might react based on whichever metallic mean you've selected. The zig-zag settings let you tune the sensitivity of swing detection through ATR period, ATR multiplier, percentage reversal, and additional absolute or tick-based reversal values.
What this really demonstrates is that retracement analysis is more flexible than most traders realize. There's no mathematical law that says markets must respect the golden ratio over any other metallic mean. They're all valid mathematical constructs with the same kind of recursive properties. By making this tool, I wanted to highlight that using fibonacci retracements involves an arbitrary choice, and maybe that choice should be more deliberate or at least tested against alternatives. You can experiment with different metallic numbers and see which ones seem to work better for your particular market or timeframe, or just use this to understand that the standard fib levels everyone uses aren't as fundamental as they appear.
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.
🚀 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
Institutional Orderflow Pro — VWAP, Delta, and Liquidity
Institutional Orderflow Pro is a next-generation order flow analysis indicator designed to help traders identify institutional participation, directional bias, and exhaustion zones in real time.
Unlike traditional volume-based indicators, it merges VWAP dynamics, cumulative delta, relative volume, and liquidity proximity into a single unified dashboard that updates tick-by-tick — without repainting.
The indicator is open-source, transparent, and educational. It aims to provide traders with a clearer read on who controls the market — buyers or sellers — and where liquidity lies.
The indicator combines multiple institutional-grade analytics into one framework:
RVOL (Relative Volume) = Compares current volume against the average of recent bars to identify strong institutional participation.
zΔ (Delta Z-Score) = Normalizes the buying/selling delta to reveal unusually aggressive market behavior.
CVDΔ (Cumulative Volume Delta Change) = Shows which side (buyers/sellers) is dominating this bar’s order flow.
VWAP Direction & Slope = Determines whether price is trading above/below VWAP and whether VWAP is trending or flat.
PD Distance (Prev Day Confluence) = Measures the current price’s distance from previous day’s high, low, close, and VWAP in ATR units — highlighting liquidity zones.
ABS/EXH Detection = Identifies institutional absorption and exhaustion patterns where momentum may reverse.
Bias Computation = Combines VWAP direction + slope to give a simplified regime signal: UP, DOWN, or FLAT.
All metrics are displayed through a color-coded, non-repainting HUD:
🟢 = bullish / favorable conditions
🔴 = bearish / weak conditions
⚫ = neutral / flat
🟡 = absorption (potential trap zone)
🟠 = exhaustion (momentum fading)
| Metric | Signal | Meaning |
| ---------------------- | ------- | ---------------------------------------------- |
| **RVOL ≥ 1.3** | 🟢 | High institutional activity — valid setup zone |
| **zΔ ≥ 1.2 / ≤ -1.2** | 🟢 / 🔴 | Unusual buy/sell aggression |
| **CVDΔ > 0** | 🟢 | Buyers dominate this bar |
| **VWAP dir ↑ / ↓** | 🟢 / 🔴 | Institutional bias long/short |
| **Slope ok = YES** | 🟢 | Trending market |
| **PD dist ≤ 0.35 ATR** | 🟢 | Near key liquidity zones |
| **Bias = UP/DOWN** | 🟢 / 🔴 | Trend-aligned environment |
| **ABS/EXH active** | 🟡 / 🟠 | Caution — possible reversal zone |
How to Use
Confirm Volume Context → RVOL > 1.2
Align with Bias → Take longs only when Bias = UP, shorts only when Bias = DOWN.
Check Slope and VWAP Dir → Ensure trending context (Slope = YES).
Confirm CVD and zΔ → Flow should agree with price direction.
Avoid ABS/EXH Triggers → These signal exhaustion or absorption by large players.
Enter Near PD Zones → Ideal trade zones are within 0.35 ATR of prior-day levels.
This multi-factor confirmation reduces noise and focuses only on high-probability institutional setups.
Originality
This script was written from scratch in Pine v6.
It does not reuse existing public indicators except for standard built-ins (ta.vwap, ta.atr, etc.).
The unique combination of delta z-scoring, VWAP slope filtering, and real-time confluence zones distinguishes it from typical orderflow tools or cumulative delta overlays.
The core innovation is its merged real-time HUD that integrates institutional metrics and natural-language feedback directly on the chart, allowing traders to read market context intuitively rather than decode multiple subplots.
Notes & Disclaimers
This indicator does not repaint.
It’s intended for educational and analytical purposes only — not as financial advice or a guaranteed signal system.
Works best on liquid instruments (Futures, Indices, FX majors).
Avoid non-standard chart types (Heikin Ashi, Renko, etc.) for accurate readings.
Open-source, modifiable, and compatible with Pine v6.
Recommended Use
Apply it with clean charts and standard candles for the best clarity.
Use alongside a basic structure or volume profile to contextualize institutional bias zones.
Author: Dhawal Ranka
Category - Orderflow / VWAP / Institutional Analysis
Version: Pine Script™ v6
License: Open Source (Educational Use)
Adaptive Trend & Momentum Composite (ATMC)This script combines two well-established technical concepts—adaptive moving averages and normalized momentum oscillators—into a single, cohesive system designed to identify high-probability trend continuations with reduced noise.
What it does:
The indicator dynamically adjusts its sensitivity based on market volatility (using an ATR-based filter) and overlays a smoothed momentum signal that highlights potential exhaustion points within the prevailing trend. Unlike generic "trend-following" scripts, this implementation uses the Kaufman Adaptive Moving Average (KAMA) for price filtering and a rate-of-change (ROC) oscillator normalized between -1 and +1 to gauge momentum strength.
How it works:
Trend Filter: KAMA adapts its smoothing factor based on market efficiency—reacting quickly in trending markets and slowing down in choppy conditions.
Momentum Confirmation: A 9-period ROC is scaled to a fixed range to avoid amplitude distortion across assets. When momentum aligns with the KAMA direction and exceeds a volatility-adjusted threshold, the script paints a colored background (green for long bias, red for short bias).
Noise Reduction: Signals are only displayed when the 14-period ATR is above its 50-period moving average, ensuring trades occur in sufficiently active markets.
How to use it:
Long setups: Look for green background zones after a pullback, ideally near dynamic support (e.g., previous swing low or KAMA line).
Short setups: Red zones after rallies near resistance.
Avoid trading when no background is shown—this indicates either low volatility or conflicting signals.
Why this mashup is useful:
Many traders combine trend and momentum indicators, but often without synchronization logic. Here, both components are interdependent: momentum must confirm the adaptive trend and pass a volatility gate. This reduces false signals common in sideways markets—a frequent pain point with standard MACD or EMA crossovers.
This script is not investment advice. Test it thoroughly in your own strategy before live use.
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.
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.
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.
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. 🛡️
RPT Position Sizer🎯 Purpose
This indicator is a position sizing and stop-loss calculator designed to help traders instantly determine:
How many shares/contracts to buy,
How much risk (₹) they are taking per trade,
How much capital will be deployed, and
The precise stop-loss price level based on user-defined parameters.
It displays all key values in a compact on-chart table (bottom-left corner) for quick trade planning.
💡 Use Case
Perfect for discretionary swing traders, systematic position traders, and risk managers who want instant visual feedback of trade sizing metrics directly on the chart — eliminating manual calculations and improving discipline.
⚙️ Key Features
Dynamic Inputs
Trading Capital (₹) — total available capital for trading.
RPT % — risk-per-trade as a percentage of total capital.
SL % — stop-loss distance in percent below CMP (Current Market Price).
CMP Source — can be linked to close, hl2, etc.
Rounding Style — round position size to Nearest, Floor, or Ceil.
Decimals Show — control number formatting precision in the table.
Core Calculations
SL Points: CMP × SL%
SL Price: CMP − SL Points
Risk Amount (₹): Capital × RPT%
Position Size: Risk ÷ SL Points
Capital Used: Position Size × CMP
Clean On-Chart Table Display
Displays:
Trading Capital
RPT %
Risk Amount (₹)
Position Size (shares/contracts)
Capital Required (₹)
Stop-Loss % & SL Price
The table uses a minimalistic white-on-black design with clear labeling and rupee formatting for quick reference.
Data Window Integration
Plots hidden values (Position Size, Risk Amount, SL Points, Capital Used) for use in TradingView’s Data Window—ideal for strategy testing and exporting values.
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.
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.
ATEŞ-19 TARAMA MODÜLÜ)This published scanning module is intended for support and educational purposes only.
It does not constitute investment advice under any circumstances.
You should make your buy and sell decisions based on your own strategies and risk management.
This module may be used as a supportive tool to assist in your investment process.
EMA Fractal and vwap - FIMIDOIt is a testing only strategy with alerts - FOR MNQ and MES Futures
This script implements a multi-indicator-based approach to generate long (buy) and short (sell) signals, incorporating elements like Exponential Moving Averages (EMAs), WaveTrend, volume filters, Cumulative Volume Delta (CVD) trends, fractal prime zones, and Volume Weighted Average Price (VWAP) with trend-based coloring. It includes risk management features such as stop-loss, take-profit, position sizing based on account risk, daily loss limits, and trade pauses after losses. The strategy is highly configurable through user inputs, allowing traders to enable/disable various filters and trade types.
Important Note: This script is still in the testing phase. It has not been fully optimized or backtested across various market conditions, instruments, or timeframes. Users should thoroughly test it in a simulated environment before applying it to live trading, as it may contain bugs, inefficiencies, or unintended behaviors. Past performance in backtests does not guarantee future results, and trading involves significant financial risk.
Key Features and Structure
The script is structured into sections: inputs, functions, calculations, trading filters, strategy logic, plots, alerts, and visual elements. It operates as a strategy overlay on price charts, meaning it plots indicators directly on the main chart and executes hypothetical trades based on defined rules.
Strategy Parameters:
Initial capital: Starts with $50,000 (configurable).
Margin: 1% for both long and short positions.
Overlay: True, so it displays on the price chart.
Inputs
The script provides extensive user-configurable inputs grouped by category for ease of use:
Risk Management:
Risk % of Account: Percentage of equity risked per trade (default: 2%).
Risk-Reward Ratio: Multiplier for take-profit relative to stop-loss (default: 1.7).
Max Daily Loss %: Stops trading if daily losses exceed this threshold (default: 0.4%).
Stop-Loss Points Buffer: Adjusts stop-loss placement (default: -8.1 points).
Max Trades per Day: Limits trades per session (default: 3).
Pause Candles After Loss: Halts trading for a set number of bars after a losing trade (default: 19).
Trading Hours:
Start/End Hour: Restricts trading to specific hours (default: 6 AM to 9 AM, in 24-hour format).
Trade Types:
Enable Long/Short Trades: Toggles long (buy) or short (sell) positions (both default: true).
VWAP Filter Settings:
Use VWAP Filter: Requires buys above VWAP and sells below (default: true).
VWAP Trend Length: Period for trend calculation (default: 5 bars).
VWAP Trend Threshold: Minimum change for considering a trend (default: 0.0 points).
Disable Trades on Flat VWAP: Prevents trades when VWAP is gray (flat trend) (default: true).
EMA Settings:
EMA Master Length: A base EMA for general filtering (default: 6).
Separate EMA configurations for long and short trades, including smoothing types (RMA, SMA, EMA, WMA) and fast/slow lengths.
WaveTrend Settings:
Use WaveTrend: Enables momentum-based signals (default: false).
Channel, Average, and MA lengths for customization.
Volume Filter Settings:
Separate filters for long/short with MA lengths and threshold multipliers to ensure high-volume conditions.
CVD Trend Settings:
Use CVD for long/short: Filters based on volume delta trends using ATR multipliers and lengths.
Fractal Prime Zones Settings:
Use Fractal: Enables support/resistance zones based on fractals (default: true).
Length, sensitivity, and options to include volume delta or show labels.
These inputs allow for fine-tuning the strategy to different assets or market conditions.
Functions
Two main helper functions are defined:
f_wavetrend: Calculates WaveTrend values using EMAs on a custom source, producing two lines (WT1 and WT2) for crossover detection.
f_ema: A simple EMA wrapper (though it uses built-in ta.ema).
ma_function: A versatile moving average calculator supporting RMA, SMA, EMA, or WMA based on user selection.
Calculations
The core of the script involves computing multiple indicators:
VWAP: Based on HLC3 (high-low-close average), anchored daily. It's plotted with dynamic coloring: green for upward trend, red for downward, and gray for flat (based on slope over the trend length and threshold).
Volume Filters: SMA-based checks to ensure volume exceeds a threshold multiple.
EMAs: Custom fast/slow EMAs for long/short, with crossovers/crossunders generating signals.
WaveTrend: Momentum oscillator with cross detection for up/down signals.
CVD Trends: Bollinger-like bands using SMA and ATR multiples to detect uptrends (close above upper band) or downtrends.
Fractal Prime Zones: Advanced zones using prime numbers, ATR, and optional CVD. Calculates density-based upper/lower zones, identifies support/resistance, and generates buy/sell signals on zone breaks.
Trading Window and Counters: Checks time of day, resets daily trade counts, and manages pause after losses.
Risk Calculations: Dynamically computes position size based on risk amount, stop-loss distance, and equity.
Entry signals (buyTriangle and sellTriangle) combine these: All enabled filters must pass (e.g., EMA crossover, high volume, CVD trend, fractal signal, VWAP position, and trending VWAP if filtered).
Strategy Logic
Entry Conditions: Triggers long/short entries only if signals align, within trading hours, under max trades/day, not paused, and daily loss not exceeded.
Stop-loss: Placed below low (long) or above high (short) with buffer.
Position Size: Floored to nearest integer based on risk amount divided by per-unit risk.
Take-Profit: Set at entry price plus/minus (risk distance * RR ratio).
Exits: Via strategy.exit with stop and limit orders.
Loss Handling: Updates daily loss on trade close; pauses if loss occurs.
No Trades on Flat VWAP: If enabled, skips entries when VWAP trend is neutral (gray).
Plots and Visuals
Shapes: Triangles for buy (blue, below bar) and sell (red, above bar) signals.
VWAP Line: Colored dynamically.
Fractal Zones: Plotted with fill and optional labels for support/resistance.
Debug Plots: Characters for trading window, pause, and max trades exceeded.
TP/SL Lines: Drawn as arrows on entries.
Daily Loss Table: Displays current loss and limit in a bottom-right table.
Alerts
Generates alerts on entries with details: entry price, SL, TP.
This strategy emphasizes trend-following with filters to reduce false signals, but its complexity may lead to over-optimization. Again, as it is still in the testing phase, users are advised to backtest extensively, forward-test on demo accounts, and monitor for issues like slippage, commissions, or market regime changes before real-world use. If you need modifications or further analysis, let me know!
SEVENX Free|SuperFundedSEVENX — Modular Multi-Signal Scanner (SuperFunded)
What it is
SEVENX combines seven classic signals—MACD, OBV, RSI, Stochastics, CCI, Momentum, and an optional ATR volatility filter—into a modular gate. You can toggle each condition on/off, and a BUY/SELL arrow prints only when all enabled conditions agree. Text labels are optional.
Why this is not a simple mashup
・Most “combo” scripts just overlay indicators. SEVENX is a strict consensus engine:
・Each condition is binary and user-switchable.
・The final signal is the logical AND of all enabled checks (no hidden weights).
・Signals fire only on confirmed events (e.g., RSI crossing a level, Stoch K/D cross), which makes entries rule-driven and reproducible.
This yields a transparent, vendor-grade workflow where traders can start simple (2–3 gates) and tighten selectivity by enabling more gates.
How it works (concise)
・MACD: macd_line > signal_line (buy) / < (sell).
・OBV trend: OBV > OBV_MA (buy) / < (sell).
・RSI bounce/drop: crossover(RSI, Oversold) (buy) / crossunder(RSI, Overbought) (sell).
・Stoch cross: %K crosses above %D (buy) / below (sell).
・CCI rebound/pullback: crossover(CCI, -Level) (buy) / crossunder(CCI, +Level) (sell).
・Momentum: Momentum > 0 (buy) / < 0 (sell).
・ATR filter (optional): ATR > ATR_MA must also be true (both sides).
・Final signal: AND of all enabled conditions. If you enable none on a side, that side will not print.
Parameters (UI mapping)
Buy Signal (group: “— Buy Signal —”)
・MACD Golden Cross / OBV Uptrend / RSI Bounce from Oversold / Stochastic Golden Cross / CCI Rebound from Oversold / Momentum > 0 / ATR Volatility Filter (on/off)
Sell Signal (group: “— Sell Signal —”)
・MACD Dead Cross / OBV Downtrend / RSI Drop from Overbought / Stochastic Dead Cross / CCI Pullback from Overbought / Momentum < 0 / ATR Volatility Filter (on/off)
Indicator Settings
・MACD: Fast/Slow/Signal lengths.
・RSI: Length, Overbought/Oversold levels.
・Stochastics: %K length, %D smoothing, overall smoothing.
・CCI: Length, Level (±Level used).
・Momentum: Length.
・OBV: MA length for trend baseline.
・ATR: ATR length, ATR MA length (for the filter).
Display
・Show Text (BUY/SELL text on the markers), Buy/Sell Text Colors.
Practical usage
・Start simple: Enable 2 conditions (e.g., MACD + RSI). If signals are too frequent, add OBV or Momentum; if still frequent, enable ATR filter.
・Mean-reversion vs trend:
・For trend-following, prefer MACD/OBV/Momentum gates.
・For reversal bounces, add RSI/CCI gates and keep Stoch for timing.
・Tuning sensitivity:
・Raise RSI Oversold/Overbought thresholds to make bounces rarer.
・Increase ATR_MA length to smooth the volatility baseline.
・Risk first: Plan SL/TP independently (e.g., structure levels or R-multiples). SEVENX focuses on entry qualification, not exits.
Repainting & confirmation
Signals depend on cross events and are best treated on bar close. Intrabar flips can occur before a bar closes; for strict rules, confirm on closed bars in your strategy.
Disclaimer
No indicator can guarantee outcomes. News, liquidity, and spread conditions can invalidate signals. Trade responsibly and manage risk.
This indicator is being released on a trial basis and may be discontinued at our discretion.
SEVENX — モジュラー型マルチシグナル・スキャナー(日本語)
概要
SEVENXは、MACD / OBV / RSI / ストキャス / CCI / モメンタム / ATRフィルターの7条件を個別オン・オフで制御し、有効化した条件がすべて満たされたときだけBUY/SELL矢印を表示する、合意(AND)型シグナルインジです。テキスト表示も任意。
独自性・新規性
・各条件はブラックボックスではなく明示的なブール判定で、最終シグナルは有効化した条件のAND。
・RSIのレベルクロスやStochのK/Dクロスなど、確定イベントで判定するため、再現性の高いルール運用が可能。少数条件から始めて、必要に応じて段階的に厳格化できます。
動作要点
・MACD:線がシグナル上/下。
・OBV:OBVがOBVのMAより上/下。
・RSI:RSIがOSを上抜け(買い)/OBを下抜け(売り)。
・Stoch:%Kが%Dを上抜け/下抜け。
・CCI:CCIが**−Levelを上抜け**(買い)/+Levelを下抜け(売り)。
・Momentum:0より上/下。
・ATRフィルター(任意):ATR > ATR_MA を満たすこと(買い/売り共通)。
・最終サイン:有効化した条件のAND。そのサイドで1つも有効化していなければサインは出ません。
実践ヒント
・まずは2条件(例:MACD+RSI)でテスト → 多すぎるならOBV/MomentumやATRフィルターを追加。
・トレンド重視:MACD/OBV/Momentumを主軸に。
・押し目・戻り目狙い:RSI/CCIを追加、Stochでタイミング調整。
・感度調整:RSIのOB/OSを広げる、ATR_MAを長くする等で厳しめに。
・出口は別設計:SL/TPは価格帯やR倍数などで管理を。
再描画と確定
確定足基準で判断すると安定します。足確定前はクロスが行き来することがあります。
免責
シグナルの機能は保証されません。イベントや流動性で無効化する場合があります。資金管理のうえ自己責任でご利用ください。
このインジケーターは試験公開のため、弊社の裁量で公開を停止する場合があります。
ICT Smart Entry - Auto Adaptive Dual Gold & BTC (v6 Light)Publication Description (English first, detailed)
What this script does (originality & concept):
This is a closed-form ICT-style Smart Entry helper designed specifically for Gold (XAUUSD) and Bitcoin (BTCUSD). It fuses four components into a single flow: (1) swing-based market structure (BOS up/down), (2) fair-value-gap presence to filter weak breaks, (3) liquidity sweep context using recent local extremes, and (4) an auto-adaptive threshold that scales with ATR to avoid false breaks in calm markets and over-sensitivity in volatile regimes. When a valid BOS aligns with context (FVG + sweep), the tool derives the most recent opposite candle and builds an Order Block (OB) zone. Entries are signaled only when price revisits the OB and a cooldown is respected.
How the components work together:
Adaptive threshold (ATR): compares current ATR to a long ATR average and sets the BOS strength dynamically (Calm/Normal/Volatile).
BOS & swings: detects last swing high/low and requires the close to exceed it by a dynamic ATR multiple.
FVG filter: requires a simple two-bar imbalance (bull/bear) around the break to represent displacement.
Liquidity sweep: checks if recent local highs/lows were swept before the break to bias entries.
OB derivation: finds the last opposite candle within a lookback window and builds a forward-extended box.
Execution helper: when price trades back inside the OB, it prints an entry label plus SL at the opposite side of the box and two fixed R targets (1R and 2R). Alerts are provided for BUY/SELL entries.
How to use it:
Add to any chart (built for XAUUSD & BTCUSD; works on others too).
Choose your session, swing lengths, lookback, and cooldown. Leave “Enable Auto Adaptation” on by default.
Wait for an OB to appear after a valid BOS+FVG+sweep.
When price returns to the box, consider the printed entry with SL at the other side of the box and 1R/2R targets.
Optional: Use higher-TF bias confluence and your own risk rules.
Notes & limits:
This is an execution assistant, not a full strategy. It does not place orders or guarantee results.
OBs are regenerated; only the latest box is kept for clarity.
Alerts fire on entry confirmation only.
Past performance is not indicative of future results.
Inputs (summary): ATR period; swing lengths; OB lookback & extension; session filter; cooldown bars.
Arabic (for convenience):
هذا المؤشر يجمع هيكلة السوق (BOS)، وفجوة القيمة العادلة (FVG)، وسياق سحب السيولة، مع عتبة متكيفة بالـATR. عند تحقق BOS قوي مع FVG وسحب سيولة، يحدد آخر شمعة معاكسة ويُنشئ منطقة OB. عند عودة السعر للصندوق، يظهر دخول مع SL عند الجهة المقابلة وهدفين 1R/2R. يفضّل استخدامه مع تأكيدات من فريم أعلى وإدارة مخاطر صارمة. هذا أداة مساعدة وليست إستراتيجية تنفيذ أوامر.
Quick compliance checklist
✅ Title: English, ASCII only (no emoji, no fancy dash).
✅ UI text: English, ASCII only here.
✅ No ALL CAPS in title/description (only acronyms like ICT/BTC).
✅ Description: Detailed, explains originality + how parts interact + how to use.
✅ Chart info: Script adds a small header label with Symbol/TF/Script name.
✅ No mashup-without-purpose: Description justifies each component and why they’re combined.
MARITradesGold Indicator A - BUY AND SELL ModelThe MARITrades Gold Indicator A – BOS Model is a professional charting tool designed to help traders visually identify structure breaks (BOS) and potential Fibonacci retracement zones during key market sessions on XAU/USD.
It combines session timing filters, Break of Structure logic, and a WMA160 trend bias to help users study clean continuation or reversal setups with precision.
This indicator is intended for traders who are learning or refining their market structure and session-based gold strategy.
KEY FEATURES AND HOW TO USE
Apply the indicator to XAU/USD on a preferred timeframe
Wait for a Break of Structure (BOS) during valid session hours.
Watch for retracement into 0.5–0.618 Fib levels for possible continuation zones which are marked out with coloured lines. you can edit the colours to your preference
Confirm direction with Moving average160 trend bias.
Use Stop loss and take profit levels for educational visualization — not for direct trade execution.
you can keep the indicator free or lines which optional to view the BUY and SELL signals
📊 BOS Detection: Marks bullish or bearish structure breaks after key levels.
📈 Fibonacci Zones: Auto-calculates retracement zones and gives you signal bias
🕒 Session Filters: Includes Sydney, Asian, London, and New York session timing tools.
🧭 Trend Filter: Moving Average (MA160) helps define directional bias.
🧩 Clean Visualization: retracement zones, and structure markers for chart clarity.
🚨 Optional Alerts: Alerts can be added when structure breaks align with session filters.