ATR + BJ Signal V3ATR + BJ Signal (Optimized for GOLD)
This indicator is designed for mean-reversion scalping on GOLD, focusing on volatility expansion and momentum exhaustion.
Key features:
ATR-based candle expansion filter to detect abnormal moves
RSI overbought / oversold confirmation
Optional Bollinger Band deviation filter
Clear BUY / SELL signals for reversal entries
Automatic SL / TP projection lines and price labels (individually toggleable)
Best suited for short-term reversal and scalp trades during high-volatility conditions.
All visual components can be enabled or disabled independently. be enabled or disabled independently.
Trend Analizi
Above VWAP (Y/N)Background-only overlay script.
It does not plot VWAP, does not draw any lines, and exists only to color the chart background based on above / below VWAP.
Trappp's Advanced Multi-Timeframe Trading ToolkitTrappp's Advanced Multi-Timeframe Trading Toolkit
This comprehensive trading script by Trappp provides a complete market analysis framework with multiple timeframe support and resistance levels. The indicator features:
Key Levels:
· Monthly (light blue dashed) and Weekly (gold dashed) levels for long-term context
· Previous day high/low (yellow) with range display
· Pivot-based support/resistance (pink dashed)
· Premarket levels (blue) for pre-market activity
Intraday Levels:
· 1-minute opening candle (red)
· 5-minute (white), 15-minute (green), and 30-minute (purple) session levels
· All intraday levels extend right throughout the trading day
Technical Features:
· EMA 50/200 cross detection with alert labels
· Candlestick pattern recognition near key levels
· Smart proximity detection using ATR
· Automatic daily/weekly/monthly updates
Trappp's script is designed for traders who need immediate visual reference of critical price levels across multiple timeframes, helping identify potential breakouts, reversals, and pattern-based setups with clear, color-coded visuals for quick decision-making.
Advanced Trading ToolkitTrappp's Advanced Multi-Timeframe Trading Toolkit
This comprehensive trading script by Trappp provides a complete market analysis framework with multiple timeframe support and resistance levels. The indicator features:
Key Levels:
· Monthly (light blue dashed) and Weekly (gold dashed) levels for long-term context
· Previous day high/low (yellow) with range display
· Pivot-based support/resistance (pink dashed)
· Premarket levels (blue) for pre-market activity
Intraday Levels:
· 1-minute opening candle (red)
· 5-minute (white), 15-minute (green), and 30-minute (purple) session levels
· All intraday levels extend right throughout the trading day
Technical Features:
· EMA 50/200 cross detection with alert labels
· Candlestick pattern recognition near key levels
· Smart proximity detection using ATR
· Automatic daily/weekly/monthly updates
Trappp's script is designed for traders who need immediate visual reference of critical price levels across multiple timeframes, helping identify potential breakouts, reversals, and pattern-based setups with clear, color-coded visuals for quick decision-making.
Eccodax Robust k-NN Machine Learning LorentzianHere is the complete, final, corrected, and clean code, already including:
✅ Fixed shadowing of the variable d
✅ No compilation warnings
✅ No temporal leaks
✅ Target = real future return
✅ Robust Lorentzian distance
✅ Correct Matrix structure
✅ Consistent feature engineering
✅ Min-Max normalization
✅ Weighted k-NN inference
✅ Correct price reconstruction
1. What this code is
It is a predictive indicator based on classic Machine Learning (k-Nearest Neighbors), fully implemented in PineScript v6, designed to:
Learn historical market patterns
Compare the current state with similar past states
Estimate the expected future price movement
Reconstruct a projected price consistent with the current level
It is not an oscillator, it is not a traditional technical indicator, and it does not react only to the immediate past.
2. What the Model Learns (Supervised Learning)
2.1 Features (Input Variables)
The model uses three dimensions of information, all normalized by Z-score:
Return
Measures the percentage change in price
Captures the immediate momentum of the market
Momentum (ROC)
Measures acceleration or deceleration of the movement
Differentiates trends from consolidations
Volatility
Measures the degree of market uncertainty
Adjusts the weight of strong movements vs. noise
These three variables form a market state vector.
2.2 Normalization (Z-Score)
Each feature is converted to:
Mean ≈ 0
Standard deviation ≈ 1
This ensures that:
No variable dominates the distance
The statistical comparison is valid
The model is stable in different price regimes
2.3 Target (Predicted Variable)
The model does not predict absolute price. It learns:
Observed future return after forecastBars
That is:
Learns movement, not level
Eliminates historical bias
Avoids predictions inconsistent with the current price
3. How the model makes the prediction
3.1 Search for similar patterns (k-NN)
For each current candle, the model:
Analyzes the last lookback candles
Calculates the Euclidean distance between the current state and each past state
Selects the k most similar states
Observes what happened after them
3.2 Inference
The predicted return is calculated as:
Weighted average of the future returns of the neighbors
Weights inversely proportional to the distance
More similar states → greater influence.
4. Price Reconstruction (Key Information)
From the predicted return, the model reconstructs:
Predicted Price = Current Close × (1 + Predicted Return)
Predicted Price = Current Close × (1 + Predicted Return)
This ensures that:
The forecast respects the current market level
The output is visually interpretable
There is no regression to past regimes
5. Relevant Information the Indicator Delivers
5.1 Predicted Price (Green Line)
What it is: Estimated price after forecastBars.
How to use:
Above the current price → bullish bias
Below → bearish bias
Large distance → expectation of strong movement
5.2 Predicted Return (Implicit)
Even though not plotted directly, it is the most important information in the model.
Positive → expectation of appreciation
Negative → expectation of decline
Negative → expectation of decline
Near zero → sideways market
5.3 Directional Classification (optional)
The model also acts as a binary classifier:
High if expected return > 0
Low if expected return < 0
This is used as:
Noise filter
Trend confirmation
False signal reduction
5.4 Implicit statistical context
The indicator carries information that is not visual, but is fundamental:
Market regime (trending vs. sideways)
Statistical similarity with the past
Relative confidence (via distance from neighbors)
6. What this indicator does NOT do
It is important to align expectations:
❌ Does not predict exogenous events
❌ Does not anticipate gaps
❌ Does not work well on illiquid assets
❌ Does not extrapolate long trends
k-NN replicates patterns, does not create scenarios Unprecedented.
7. Where this model works best
Markets with repetitive structure
Medium timeframes (5m – 1D)
Liquid assets
Environments with alternating regimes
8. How to use it in practice (professional recommendation)
Ideal use:
k-NN direction → bias
Technical indicator → timing
Risk management → execution
Never use it in isolation for entry.
9. Executive summary
This code delivers:
A functional supervised ML model in Pine
Prediction consistent with the current price
Statistical market direction
Reduction of historical bias
Solid foundation for quantitative strategies
Flexible S/R Channels🟩 Flexible S/R Channels is a visualization tool that draws curved support and resistance boundaries through user-defined anchor points. Unlike traditional trendlines and channels that force linear interpretation onto price action, this indicator captures the curved structures that markets frequently form—rounded tops and bottoms, parabolic advances and declines, arcing rallies and pullbacks. Three anchor points per curve define the shape; the indicator fits a smooth mathematical curve through these points and projects it forward. The approach is simple: draw what you see. Curved market structure that resists precise definition with traditional tools can now be rendered with mathematical accuracy.
The indicator bridges the gap between static drawing tools and programmable indicators. TradingView's arc tool draws curves but produces only visual pixels with no analytical value. Flexible S/R Channels creates live data series that integrate with other analysis tools. Four curve-fitting methods—Quadratic, Quadratic-Linear, Weighted Linear, and Natural Cubic Spline—accommodate different market structures. The curved levels naturally lend themselves to breakout and reversion strategies—applications left to the trader's discretion. The open-source code invites experimentation and customization.
💡 THEORY AND CONCEPT 💡
Traders have long relied on horizontal levels and diagonal trendlines to define support and resistance. Linear tools assume constant slope—a property rarely exhibited by actual market movement. When momentum accelerates or decelerates, price trajectories curve rather than hold to fixed angles. The resulting structures—parabolic advances during expansion phases, arcing pullbacks during consolidation, rounded formations at reversal points—represent changes in the rate of change itself. Traditional drawing tools cannot accommodate this variable geometry without sacrificing mathematical precision..
Flexible S/R Channels extends familiar support and resistance concepts into curved space. The approach is simple: draw what you see. When the eye recognizes a curved boundary in price action, this indicator provides the means to define it precisely. Three anchor points per curve—an initial point, an intermediate point, and a recent point—are all that is required. The indicator fits a smooth mathematical curve through these points and extends it forward as a projection.
This indicator represents a blend of human pattern recognition and algorithmic precision. Fully automated indicators make decisions without user input—efficient but detached from trader discretion. Manual drawing tools rely entirely on freehand skill—expressive but imprecise. Flexible S/R Channels occupies the middle ground. The trader identifies the curved structure; the algorithm renders it mathematically. The result is human insight expressed with computational accuracy—for traders who recognize curved structure in price action but lack precise tools to define it.
This projection is not a prediction. It is a visual hypothesis—a structured way of asking "if this trajectory continues, where would price be?" The underlying assumption is simple: like Newton's first law of motion, a trajectory in motion tends to continue unless acted upon by an external force. Future price action validates or invalidates the projection, just as it does with any trendline or channel.
TradingView offers an arc drawing tool for freehand curved lines, but these are purely visual—static pixels on a screen with no programmable value. Flexible S/R Channels bridges this gap. The fitted curves exist as data series that can generate alerts, trigger signals, and interact with other analysis tools. The visual drawing becomes operational structure.
🔁 CURVE METHODS 🔁
The indicator offers four curve-calculation methods, each producing different shapes suited to different market structures:
Quadratic — Fits a parabolic arc through the three anchor points. Best for smooth, continuous curves such as rounded tops and bottoms. It captures the natural "swing" of the market, assuming the momentum will maintain its current rate of acceleration or deceleration.
Quadratic-Linear — Uses a parabolic curve through the anchor points, then transitions to a straight line after the final anchor. Useful when curved structure gives way to linear trend continuation. This is the "bridge" between a turning market and a steady, directed move, preventing the projection from curving back on itself when the price begins to run.
Weighted Linear — Connects anchor points with straight line segments rather than a smooth curve. Suited for angular market structures with distinct inflection points. It treats the market as a series of rigid shifts, providing a clear "corridor" when the price is bouncing between sharp, diagonal levels.
Natural Cubic Spline — Produces the smoothest curve by minimizing abrupt directional changes. Ideal for organic, flowing market movements. It acts as a flexible spine that adapts to complex transitions without the rigid constraints of a fixed geometric shape.
Quadratic Fitting : A smooth, parabolic arc defines a curved resistance boundary. By fitting a mathematical path through three anchor points, the curve captures rounded structures and arcing price action that traditional linear trendlines fail to represent.
Weighted Linear Fitting : This method produces an angular, segmented path by connecting anchor points with distinct linear slopes. Unlike the continuous smoothness of a quadratic arc, the weighted linear approach creates a more jointed geometry, allowing for a precise match to market structures that exhibit sharp, localized changes in trajectory.
Natural Cubic Spline Fitting : This method creates a highly fluid, elastic curve that can accommodate complex price oscillations. In this instance, the curves define a narrowing range as support and resistance converge, highlighting the volatility compression that often precedes a significant breakout or breakdown from established structures.
🖱️ HOW IT WORKS 🖱️
1️⃣ Initial Setup
Unlike traditional indicators that calculate values automatically from price data, Flexible S/R Channels requires user-defined anchor points. This is intentional. The trader's eye is the pattern recognition engine—no algorithm can see the curved structure that experience and intuition reveal. The indicator waits for this input, then applies mathematical precision to render what the trader has identified.
The Recognition of Natural Structure : Effective analysis begins when a curved rhythm becomes visible within price action that traditional trendlines cannot satisfy. Identifying the specific swing highs and swing lows that define these boundaries is the first step in organizing a chart. By isolating three key pivots for resistance and three for support, the underlying framework of the market's trajectory is established, providing the necessary coordinates to accurately map the path.
Interactive Setup Workflow : Upon loading, the indicator prompts for the sequential selection of six points—three swing highs and three swing lows—to serve as the raw data for the calculation. While the chart remains blank during this initial phase, the curves generate instantly once the final anchor is confirmed. These points are not permanent; they appear as interactive grips that can be dragged in real time to refine the boundaries as the market structure evolves.
The indicator prompts for six sequential selections—three for resistance, three for support. The first three selections define the resistance boundary; the final three define support. This sequential grouping is distinct from zigzag-style selection patterns. Within each group, clicking order is flexible—the algorithm automatically sorts points chronologically, allowing traders to select visually prominent pivots in whatever sequence feels natural.
Structural Anchor Identification : Identifying three key swing highs and three key swing lows provides the foundation for the dual-curve geometry. These specific structural peaks and troughs serve as the coordinates for the mathematical models, ensuring that the resulting boundaries accurately reflect the underlying skeleton of the market action.
2️⃣ Interactive Adjustment
After the initial setup, all six anchor points are fully adjustable:
Points are automatically sorted chronologically regardless of selection order
Grip handles appear at each anchor location
Any point can be repositioned by clicking and dragging its grip handle
The curves recalculate instantly as points are adjusted
The algorithm produces a mathematically perfect curve based on the anchor points provided. If the result does not match the trader's vision, adjustments are immediate. This iterative refinement—see, adjust, refine—continues until the rendered curve represents what the trader sees in the price action. The user remains in control; the algorithm remains in service.
Interactive Channel Boundaries : Six user-defined anchor points—three for resistance and three for support —establish a non-linear range that moves beyond the constraints of a flat, horizontal channel. This configuration captures the arcing trajectory of the market while showing price action respecting the curved boundaries in a classic reversion pattern. By manually positioning these anchors, a dynamic dimension is added to the chart that maintains structural integrity even as the price follows a rounded path.
🛠️ SETTINGS 🛠️
Customizable Visual Feedback : Beyond the core geometry, the visualization offers various user-defined settings to tailor the chart's information density. From identifying specific price targets to toggling structural labels, these options allow the trader to adjust the level of detail to suit their personal analysis style while maintaining a clear view of the non-linear boundaries.
Configuration Options
Curve Method — Select the curve-fitting algorithm: Quadratic, Quadratic-Linear, Weighted Linear, or Natural Cubic Spline.
Projection Length — Number of bars to project the curves beyond current price action. Projections appear as dashed lines.
Visual Settings
Grip Size — Size of the draggable handles displayed at each anchor point. Set to zero to hide grips entirely.
Line Width — Thickness of the support and resistance curves.
Support Color / Resistance Color — Color settings for each curve.
Show Info Table — Toggle display of the info table showing the current curve method in the chart corner.
Advanced: Time/Price Coordinates
The settings panel includes precise time and price values for each of the six anchor points, grouped under Resistance Time/Price and Support Time/Price. These values are populated automatically when points are selected on the chart.
Adjusting anchor points by dragging the grip handles directly on the chart is faster and more intuitive. The time/price fields are available for situations requiring exact coordinate entry—such as aligning an anchor to a specific candle timestamp or a precise price level. These fields can be safely ignored unless fine-tuning is necessary.
🖼️ CHART EXAMPLES 🖼️
The Flexible S/R Channels indicator adapts to diverse market structures across multiple timeframes and instruments. Curved boundaries can define subtle momentum shifts in near-linear trends, dramatic reversals in rounding formations, or volatility compression as channels converge toward breakout points. The four curve-fitting methods accommodate different geometries—smooth parabolic arcs for continuous momentum changes, segmented linear paths for angular structures, and elastic splines for complex oscillations. Each anchor point adjustment instantly recalculates the curves, allowing iterative refinement until the rendered boundaries align with the trader's interpretation of market structure. Forward projections extend these mathematical relationships into future territory, providing visual context for hypothetical support and resistance levels if current trajectories persist.
Subtle Curve Alignment : Even in structures that appear linear, subtle curvature allows the channel boundaries to breathe with the market’s internal momentum. By utilizing three anchor points rather than two, the channel adapts to the slight acceleration of a trend, providing a more precise fit than a rigid, straight corridor.
Decelerating Momentum and Convergence : This classic rounding structure illustrates a transition where the initial wide oscillations between highs and lows begin to contract. As the boundaries converge, the curve captures the diminishing volatility and the shift in market energy, providing a clear visual representation of a trend losing its expansive momentum as it approaches a potential turning point.
Organic Trend Modeling : In an accelerating uptrend, the Natural Cubic Spline provides a highly adaptable boundary that mirrors the organic flow of momentum. This non-traditional approach allows the channel to follow complex price pulses that a standard linear trendline would likely cut through, maintaining a precise fit even as the angle of the trend shifts over time.
Non-Linear Projections : Unlike standard trendlines that converge at a fixed rate, curved projections adapt to the historical momentum of the move. This allows the indicator to map a dynamic squeeze, capturing the subtle nuances of how price action tightens toward an apex. It provides a more sophisticated view of future convergence points that traditional linear channels often fail to anticipate.
The "Draw What You See" Philosophy : Market structures are rarely perfect, and this example highlights the indicator’s ability to map unconventional rhythms. Rather than forcing price into a predefined category, the tool remains flexible enough to define any structural path the trader identifies. If you can see a trend's trajectory, the indicator can provide the mathematical framework to support it.
Comparative Projection Modeling : Using identical anchor points as above, this example demonstrates how selecting a different calculation method can alter the projected path. While the historical fit remains precise, the variation in the forward-looking trajectory allows traders to explore multiple mathematical interpretations of the same market structure, choosing the model that best aligns with the current volatility and trend behavior.
Extended Timeframe Channel Definition : This multi-year perspective demonstrates the indicator's ability to define curved channel boundaries across extended timeframes spanning hundreds of bars and multiple market cycles. The resistance curve captures the rounded distribution of swing highs while the support curve follows the accelerating base formation, creating a non-linear channel that frames long-term structural trends more precisely than traditional parallel channels or static trendlines.
Rounding Bottom Reversal and Channel Convergence : This example captures a classic rounding bottom formation—a reversal pattern that linear tools cannot adequately define. The Quadratic method produces a smooth parabolic arc through the resistance anchors, tracing the deceleration of the downtrend, the capitulation low, and the subsequent re-acceleration upward as a single continuous curve. The support boundary mirrors this momentum shift from below, creating a curved channel that narrows toward current price. This convergence represents structural compression—the boundaries tightening as volatility contracts and directional resolution approaches. Price action oscillates within these non-linear boundaries, demonstrating that channel behavior persists even when the geometry is curved rather than parallel. The projection extends both curves forward, mapping the hypothetical trajectory if the current momentum structure continues, providing visual context for potential breakout or breakdown levels as the channel reaches its apex.
Built-in Precision vs. Algorithmic Power : While TradingView offers basic curve drawing tools (shown here as dashed lines), the Flexible S/R Channels indicator elevates this concept into a functional analytical framework. By converting manual observations into mathematical models, it moves beyond mere drawing to provide a data-driven structure that can be utilized for advanced technical analysis and future Pine Script trading logic.
⚙️ TECHNICAL DETAILS ⚙️
Curve Fitting vs. Overfitting: The term curve fitting often carries negative connotations in quantitative analysis due to its association with overfitting—the practice of adjusting a model until it perfectly matches historical data, producing an illusion of accuracy that fails when applied to new data. The application here is fundamentally different. Flexible S/R Channels does not optimize parameters to maximize historical fit; it constructs a mathematical curve through user-selected anchor points, then projects that curve into unknown territory. The curve is not fitted to price data—it is fitted to structural pivots identified by the trader. The projection represents a hypothesis about trajectory continuation, not a prediction derived from statistical optimization. Future price action validates or invalidates this hypothesis in real time, exactly as it does with any trendline or channel. The anchor points remain fixed unless manually adjusted, ensuring the curve does not adapt to new data retroactively.
Non-Repainting Behavior: The indicator does not repaint historical bars. The mathematical coefficients that define each curve are calculated once—when the final anchor point is set—and stored as fixed values. These coefficients remain constant unless an anchor point is manually repositioned. The backfit polyline is drawn once using these coefficients, spanning the known range from the first to last anchor point. The plot() function applies the same coefficients to each subsequent bar, updating in real-time as new bars form but never altering previously plotted values. The projection polyline extends forward from the current bar using the same fixed coefficients, projecting a user-defined number of future bars (maximum 500). This projection redraws on each tick to maintain its position relative to the moving current bar, but the mathematical trajectory remains constant—only the starting point advances. The current bar's curve value will update tick-by-tick as price develops, which is standard real-time behavior, not repainting. Once a bar closes, all curve values on that bar are permanent. The hybrid architecture (backfit polyline for known history, plot() for unlimited real-time range, projection polyline for controlled forward extension) prevents overflow errors while maintaining non-repainting integrity across all components.
🗒️ NOTES 🗒️
The indicator renders curves based on any anchor points provided without validation. Unusual anchor placement produces mathematically accurate but potentially non-useful results. Adjustment is iterative—if the curve doesn't match expectations, reposition the anchors.
Because anchor points are stored as specific time and price coordinates, a new instance of the indicator should be added when analyzing a different chart or timeframe.
Grip handles can be hidden by setting Grip Size to zero in the settings. This is useful for clean chart screenshots or presentations where interactive elements are not needed.
Projection length can be set to zero if forward-looking curves are not desired. The indicator will still render the backfit curves through the anchor points and continue plotting in real-time without the dotted projection extensions.
Anchor points remain fixed at their selected time-price coordinates as new bars form. The curves extend forward automatically from these historical anchors, allowing observation of how projected trajectories align with developing price action.
⚠️ DISCLAIMER ⚠️
The Flexible S/R Channels indicator is a visual analysis tool designed to illustrate geometric market inertia and serve as a framework for understanding dynamic support and resistance. While the indicator generates structural channels and projected paths, no guarantee is made regarding the accuracy or profitability of these projections. Like all technical indicators, the curves and boundaries generated by this tool may appear to align with favorable trading opportunities in hindsight. However, these visualizations are not intended as standalone recommendations for trading decisions. This indicator is intended for educational and analytical purposes, complementing other tools and methods of market analysis.
🧠 BEYOND THE CODE 🧠
Flexible S/R Channels is part of a broader collection of tools designed to provide structured market analysis. This includes the Grid Bot Simulator , the Grid Bot Auto , the Grid Bot Parabolic , and the Gridbot Ping Pong . While each tool serves a distinct purpose, they all utilize dynamic anchor mechanics and non-linear boundaries to adapt to evolving market conditions.
This indicator shares the same educational philosophy as the Fibonacci Time-Price Zones and the Fibonacci Geometry Series - providing frameworks for understanding market concepts through visualization and experimentation rather than black-box signals.
The Flexible S/R Channels indicator, like other xxattaxx indicators , is designed to encourage both education and community engagement. Feedback and insights are invaluable to refining and enhancing this tool. We look forward to the creative applications, observations, and discussions this indicator inspires within the trading community.
Eccodax Advanced kNN Lorentziano Matrix1. What this code is
It is a predictive indicator based on classic Machine Learning (k-Nearest Neighbors), fully implemented in PineScript v6, designed to:
Learn historical market patterns
Compare the current state with similar past states
Estimate the expected future price movement
Reconstruct a projected price consistent with the current level
It is not an oscillator, it is not a traditional technical indicator, and it does not react only to the immediate past.
2. What the Model Learns (Supervised Learning)
2.1 Features (Input Variables)
The model uses three dimensions of information, all normalized by Z-score:
Return
Measures the percentage change in price
Captures the immediate momentum of the market
Momentum (ROC)
Measures acceleration or deceleration of the movement
Differentiates trends from consolidations
Volatility
Measures the degree of market uncertainty
Adjusts the weight of strong movements vs. noise
These three variables form a market state vector.
2.2 Normalization (Z-Score)
Each feature is converted to:
Mean ≈ 0
Standard deviation ≈ 1
This ensures that:
No variable dominates the distance
The statistical comparison is valid
The model is stable in different price regimes
2.3 Target (Predicted Variable)
The model does not predict absolute price. It learns:
Observed future return after forecastBars
That is:
Learns movement, not level
Eliminates historical bias
Avoids predictions inconsistent with the current price
3. How the model makes the prediction
3.1 Search for similar patterns (k-NN)
For each current candle, the model:
Analyzes the last lookback candles
Calculates the Euclidean distance between the current state and each past state
Selects the k most similar states
Observes what happened after them
3.2 Inference
The predicted return is calculated as:
Weighted average of the future returns of the neighbors
Weights inversely proportional to the distance
More similar states → greater influence.
4. Price Reconstruction (Key Information)
From the predicted return, the model reconstructs:
Predicted Price = Current Close × (1 + Predicted Return)
Predicted Price = Current Close × (1 + Predicted Return)
This ensures that:
The forecast respects the current market level
The output is visually interpretable
There is no regression to past regimes
5. Relevant Information the Indicator Delivers
5.1 Predicted Price (Green Line)
What it is: Estimated price after forecastBars.
How to use:
Above the current price → bullish bias
Below → bearish bias
Large distance → expectation of strong movement
5.2 Predicted Return (Implicit)
Even though not plotted directly, it is the most important information in the model.
Positive → expectation of appreciation
Negative → expectation of decline
Negative → expectation of decline
Near zero → sideways market
5.3 Directional Classification (optional)
The model also acts as a binary classifier:
High if expected return > 0
Low if expected return < 0
This is used as:
Noise filter
Trend confirmation
False signal reduction
5.4 Implicit statistical context
The indicator carries information that is not visual, but is fundamental:
Market regime (trending vs. sideways)
Statistical similarity with the past
Relative confidence (via distance from neighbors)
6. What this indicator does NOT do
It is important to align expectations:
❌ Does not predict exogenous events
❌ Does not anticipate gaps
❌ Does not work well on illiquid assets
❌ Does not extrapolate long trends
k-NN replicates patterns, does not create scenarios Unprecedented.
7. Where this model works best
Markets with repetitive structure
Medium timeframes (5m – 1D)
Liquid assets
Environments with alternating regimes
8. How to use it in practice (professional recommendation)
Ideal use:
k-NN direction → bias
Technical indicator → timing
Risk management → execution
Never use it in isolation for entry.
9. Executive summary
This code delivers:
A functional supervised ML model in Pine
Prediction consistent with the current price
Statistical market direction
Reduction of historical bias
Solid foundation for quantitative strategies
Relevant information provided by this code
1. Forecasted price (line)
Statistical projection consistent with the current level
Based on similar historical patterns
2. Implicit direction
Return > 0 → bullish bias
Return < 0 → bearish bias
3. Structural robustness
Lower sensitivity to outliers
Lower scale bias
Better adaptation to different regimes
This refactored version introduces significant improvements based on modern quantitative Machine Learning practices (similar to those found in jdehorty's "Lorentzian Classification" indicator):
Lorentzian Distance: Replaces the Euclidean distance (which is affected by noise and outliers) with Lorentzian Distance, which is much more robust for financial markets.
Matrix Structure: Uses the matrix object in Pine V6 to manage training data more efficiently and cleanly than loose arrays.
Feature Engineering (WaveTrend & RSI): Replaces simple Momentum with normalized indicators (RSI, WaveTrend, CCI, ADX), better capturing market dynamics.
Min-Max Normalization: Features are normalized on a 0-100 scale so that indicators with different magnitudes do not distort the distance calculation.
Inverse Distance Weighting: Instead of a simple average, the nearest neighbors (most similar) have greater weight in the prediction.
Weekly Open / Close S&R (Last 4 Weeks)Weekly open and close of candles from the last 4 weeks for major support and resistance.
13/34 EMA Ribbon The 13/34 EMA Ribbon is a 15-minute overlay indicator designed to identify intraday trend direction and momentum. It plots a 13 EMA and 34 EMA with a highlighted ribbon between them, making EMA crosses and trend strength easy to spot for trade entries and trend continuation.
vortex-trading-systems v3Publish Description (Vortex Trading Systems V3)
■ Theoretical Framework Vortex Trading Systems V3 represents a sophisticated approach to market trend identification by utilizing a Multi-Spectral Node Integration model. Unlike conventional momentum oscillators that rely on a single lookback period, this system evaluates the price velocity (Inertia) across 30 independent computational nodes simultaneously. This prevents the "curve-fitting" issues common in standard indicators and provides a robust, stabilized signal output.
■ Technical Methodology The core engine employs a non-linear mapping technique to process market data:
Inertia Node Processing: Raw Rate-of-Change (ROC) data is passed through 30 nested smoothing filters. Each filter weight is calculated dynamically to capture different cycles of market energy.
Arctangent Normalization: To eliminate erratic spikes and provide a clean signal, each node is normalized using an Arctangent function. This ensures that the momentum value stays within a consistent -1.0 to 1.0 range, allowing for objective threshold analysis.
Adaptive Macro Filtering: The system incorporates a request.security based macro framework. By aligning local inertia with higher timeframe (HTF) structural baselines, the algorithm filters out low-probability counter-trend traps.
■ Key Operational Features
Alpha/Beta Signal Gating: Precise entry points are defined by the convergence of short-term inertia and long-term structural alignment.
Dynamic Protection Architecture: A volatility-adjusted trailing stop mechanism is integrated to protect capital. It utilizes real-time peak/trough detection to lock in profits during strong trend extensions.
Visual Risk Management: The interface renders clear Entry, Take-Profit, and Stop-Loss layers to assist in disciplined execution and position sizing.
■ How to Interpret the Signal
Bullish Convergence (BUY): Triggered when the spectral inertia crosses above the Alpha threshold (-0.3) while the price remains above the Macro Baseline.
Bearish Convergence (SELL): Triggered when the spectral inertia crosses below the Beta threshold (0.3) while the price remains below the Macro Baseline.
■ Compliance & Disclaimer This script is a proprietary analytical tool and does not constitute financial advice. It is designed to assist traders in identifying statistical probabilities. Trading involves high risk, and users should always apply their own risk management protocols.
Realistic Trader Pullback Trader 4.0Realistic Trader Pullback Trader 4.0
Rule-Based Intraday Market Structure & Execution Framework
EMAIL UNRESTRICTEDGEARTRADING@GMAIL.COM WITH QUESTIONS
Optimized for 15 & 5 Minute Chart but works on most timeframes
Works best if extended/electronic trading hours is on but will work in RTH (when in RTH mode must use 65min in place of 1 hour, 130min instead of 2 hour, etc. for mathematical reasons).
Overview
Realistic Pullback Trader 4.0 is a rule-based intraday trading framework designed for traders who want objective structure, volume-validated signals, and price-first execution clarity—without indicator clutter or hindsight bias.
This indicator is not a prediction tool. It is a decision-support system that combines market structure, volume behavior, and candle anatomy to highlight:
High-probability trade locations
Clear pre-entry warning zones
Actionable Buy Now / Sell Now execution states
Default settings are optimized for SPY / ES (S&P 500 futures). Other symbols may require tuning.
Core Philosophy (The “Why”)
This framework is built around:
Price, volume, and market structure
No lagging or predictive calculations
Zones & levels — not indicators
Reversal candles — not oscillators
Confirmation — not hope
Automatic directional bias derived from price position to structure, not slope
All logic evaluates on confirmed candle closes. No repainting. No hindsight adjustments.
Candle & Volume Interpretation
Candle Colors (Intent Matters)
Green / Red filled candles: Represent relative volume spikes (buyer or seller exhaustion, often mark the start or end of directional movement)
White candles: True consolidation candles (when not to trade, liquidity build-up, foundation for new intraday zones)
**must use regular candles and have fill opacity changed to 0% in Trading View settings**
Proxy Volume (Optional)
Allows the chart to use another ticker’s volume (designed for futures traders)
Example: SPY volume on ES
Automatically uses proxy volume during RTH, native ticker volume outside RTH
Fully optional and configurable
Historical Liquidity Levels & Zones (Dynamic, RTH-Based)
Formed from prior liquidity, structure breaks, and key day/week/month levels
Zones evolve as new structure forms
Zone size and sensitivity are adjustable
Historical zones provide context, not signals
Intraday Zones (Dynamic)
Automatically detected from validated reversal candles
Invisible until price returns (reduces clutter)
Blue: Intraday support / demand
Yellow: Intraday resistance / supply
Intraday zones remain active until replaced by newer structure
Zone Color Logic (All Zones)
Historical Zones
Green: Price accepted above (support / demand)
Red: Price accepted below (resistance / supply)
Gray: Balance / compression
Color changes require multi-candle confirmation
Early-break logic allows faster response in volatile conditions
Intraday Zones
Blue: Price accepted above
Yellow: Price accepted below
Zone color reflects acceptance, not prediction.
Auto Bias System (Directional Context Filter)
Realistic Pullback Trader includes a fully automatic directional bias engine that provides context, not entries.
Possible bias states:
Bullish
Bearish
Bias is derived from price interaction with active zones and structure, not moving averages or trend slope.
How Auto Bias Is Used
Auto Bias is a filter, not a trigger:
When enabled, trade setup signals must align with the current bias
When disabled, signals appear regardless of bias
All other rules still apply (volume, structure, candle requirements)
Important: Bias filtering applies only to the Trade Setup Box and Buy/Sell Now display. Reversal and pullback visuals can remain enabled for trade management and context, even when bias filtering is active.
Auto Bias HUD (Upper Right)
The Trade HUD displays:
Buy Now / Sell Now when an entry zone is active
Current Auto Bias directly beneath it
Bias colors:
Green: Bullish
Red: Bearish
Purple: Range
Bias is visible at decision time, not buried in settings.
Timeframes (Important)
Optimized for:
15-Minute (Primary)
5-Minute (Secondary, displayed on 15m)
Pullbacks are 15-minute only by design.
Reversal Candles (15m & 5m)
Detects validated reversal candles
Enforces minimum candle size, momentum confirmation, volume confirmation
5-Minute Reversals on 15-Minute Chart
Displayed as yellow arrows
Detected intra-bar
Confirmed only when the 15-minute candle closes
Allows micro-timing without chart hopping
Trade Setup Boxes (Core Execution Feature)
After a valid reversal, an entry zone (offset box) is displayed.
Visual States
Yellow (Bullish) / Purple (Bearish): Setup present
Green / Red: Buy Now / Sell Now
Entry boxes disappear once invalidated
Trade HUD
Row 1: Buy Now or Sell Now
Row 2: Current Bias
Displays only when a valid entry zone exists
This enforces location-based execution and prevents chasing.
Entry Offset Logic (How Price Is Calculated)
Entry zones are calculated from the reversals bar close using:
Ticks
Percent of candle range
Greater of ticks or percent
Rules:
Bullish entries offset below the close
Bearish entries offset above the close
Offset never exceeds the candle’s high or low
Zone width is controlled separately
Alerts
Reversals
Intraday Level creation/retrace
Trade Setup (Offset Box Created)
Risk & Trade Management (Important)
This indicator:
Does not place trades
Does not manage risk
Does not guarantee outcomes
You are responsible for:
Position sizing
Stop placement
Trade management
Discipline
Final Notes
Realistic Pullback Trader 4.0 is designed for traders who:
Understand market structure
Value rules over opinions
Want confirmation instead of prediction
If you trade zones, volume, and reaction — not indicators, this framework was built for you.
Use in conjunction with the Realistic Trader Volume & Consolidation Only 3.1 Indicator.
Workspace Configuration
For the most effective use of this framework, use a two-window chart with the indicator applied to both windows.
15-Minute Window:
Use this for Master Context and identifying Directional Bias. In the Display Settings, leave both the Bias HUD and Buy/Sell HUD selected.
5-Minute Window (or less):
Use this for timing Tight Reversal Entries. In the Display Settings, turn off the Bias HUD so you only see active execution signals.
Section 1: Display Settings
Controls your visual framework and the Heads-Up Display (HUD).
Bar Size Unit Display: Select between Ticks or Points.
Hide Historical Levels/Zones (Red/Green): Leave this unchecked to maintain macro market awareness.
Min Historical Zones Size (ticks): Sets the minimum height for macro levels.
Hide Intraday Zones (Blue/Yellow): Leave this unchecked to see active retest levels.
Min Intraday Zones Size (ticks): Sets the minimum height for intraday retest levels.
Section 2: Trade Setup Settings
High-level filters for signal permissions.
Signal Direction Filter:
Higher Timeframe (15m): Auto Bias
Lower Timeframe (<15m): Both
Reversals Require Zone Touch:
Higher Timeframe: Checked
Lower Timeframe: Unchecked
Section 3: Buy/Sell Range Settings
Defines your Trade Setup Box (physical area for entry orders).
Offset Mode:
Ticks: Fixed distance from candle close (set to 0 for box at close of entry bar)
Percent of Bar: Offset based on candle height (e.g., 0.38 for 38%)
Greater of Ticks or Percent: Uses whichever is wider
Offset Box Invalidation Width (ticks): Determines execution zone width (entry at proximal side, stop loss at distal side)
Mechanical Boundary: Box never starts past candle’s extreme (high or low)
Section 4: Zones Settings
Dynamics of supply and demand zones and bias flips.
Ticks Beyond Zone for Early Breakout Flip: How far price must travel past a zone before bias flips (Red/Yellow = Supply, Green/Blue = Demand)
Closes Required to Flip Zone Color: Number of candle closes past a zone to flip color (system uses whichever happens first: tick threshold or close count)
Min Bars for Intraday Zones Formation: Move away from a reversal before a retest area is validated (recommended: 4)
Section 5: Reversal Bars
Filters out small, insignificant candles.
Min Reversal Bar Length (ticks): Choose a size sufficient for your ticker; keep consistent for data integrity
Section 6: Volume — Proxy
Institutional context for futures traders by borrowing data from equities.
Use Alternate Ticker for Volume (RTH only): Turn ON if trading futures and a comparable higher-volume equity exists (e.g., SPY for ES)
Function: Uses proxy during Regular Trading Hours, reverts to native chart volume after hours
Execution Summary
Check Bias: Ensure 15m HUD aligns with your trade
Locate Context: Trades valid in Blue (Demand) or Yellow (Supply) zones; higher probability if a Trade Setup Box appears inside them
Wait for the Signal:
Bullish: Starts as White Box, turns Green on retest; Row 1 says "Buy"
Bearish: Starts as Purple Box, turns Red on retest; Row 1 says "Sell"
Patience: Retests happen ~50% of the time within 4 candles. Don't rush; if you miss a trade, there will be others.
Alerts and Trade Management
Use built-in alert and visual management tools to maintain a rule-based approach and avoid chasing the market.
Alert Strategy
Trade Setup Alert: Set to "Once" for notification when a White (Bullish) or Purple (Bearish) setup box appears
Intraday Zone Alert: Set alerts for creation of new Blue (Demand) or Yellow (Supply) zones across multiple timeframes (30, 15, 5, and 3-minute)
Reversal Alerts: Configure for raw reversal candles for high-level awareness
Reversal Candles vs. Trade Setups
Execution Rule:
Reversal arrows always appear on the chart to show potential turns, but are not intended as standalone trade entries.
Higher Probability:
While you can trade a retest of an intraday zone manually, probability is higher if a confirmed Trade Setup Box (White/Purple) fires within that zone.
Intent:
Reversal candles without an execution box are best used for trade management (trailing stops, exit areas).
** Also add the Realistic Trader Volume & Consolidation Only 3.1 (NOT NEEDED BUT HELPS LEARN TO INTERPRET RELATIVE VOLUME IMPORTANCE)
ABG Basket Radarsimple currency basket lines where you can see what currency is stronger and what currency is weaker.
its all custom formula baskets and not just usd pairs.
Abi 15m System Abi Trend System (15M) — Multi-Timeframe Trend Confirmation Framework
Abi Trend System (15M) is a trend-confirmation and trade-timing framework designed for traders who focus on intraday swing and short-term trend continuation.
The system emphasizes higher-timeframe alignment first, then uses the 15-minute chart to identify actionable opportunities with reduced noise.
📌 Intended Use
Primary timeframe: 15-Minute
Markets: Liquid stocks, ETFs, index products
Style: Intraday swing / trend continuation
Execution: Discretionary execution with systematic alerts
This script is designed for traders who want structure and confirmation, not prediction.
🧭 Market Structure Logic
The system evaluates trend conditions across multiple timeframes:
Higher timeframe (Daily / 1H): Defines the dominant market direction
Execution timeframe (15M): Determines trade timing and structure
Trades are highlighted only when higher-timeframe context supports continuation, helping traders avoid counter-trend entries and low-quality consolidation zones.
🎯 Signal Philosophy
Signals are confirmation-based, not anticipatory
No forecasting or future data is used
Fewer signals by design, prioritizing clarity over frequency
Best suited for trend legs and continuation phases
The system is intentionally conservative to filter out marginal setups.
📈 Visual Components
Background state
Bullish: favorable long-bias environment
Bearish: favorable short-bias environment
Moving averages
Used as structural references, not predictive tools
Entry markers
Highlight qualified opportunities without cluttering the chart
All visuals are designed to support decision-making at a glance.
🔔 Alerts
Entry-focused alerts only
Designed for manual trade management
Compatible with stock, ETF, and options workflows
Exit strategy and position management are left to the trader’s discretion.
⚠️ Important Notes
This system is optimized specifically for the 15-minute timeframe
Performance depends on market regime and execution discipline
Not intended as a fully automated trading strategy
For best results, use alongside higher-timeframe analysis and risk management rules.
🛡 Access & Usage
This script is provided as an Invite-Only study to maintain quality, consistency, and controlled distribution.
Institutional Market Structure Pro [JOAT]Institutional Market Structure Pro – SMC, MTF Momentum & Z-Score Confluence Engine
IMPORTANT NOTES (READ FIRST)
This is an indicator (not a strategy). It does not place trades. It provides a structured confluence framework combining market structure, momentum, and statistical analysis.
This script is written in Pine Script v6 and is intended to be used on standard candlestick charts .
Source code visibility: This script is published as Protected Source (closed-source) . The purpose is to protect the work from unauthorized re-uploads/copies and to maintain a stable versioning path. This description is intentionally detailed so you can understand what the indicator does and how to use each feature without needing access to the implementation.
Non-Repainting: HTF data uses confirmed historical values with proper offset, ensuring reliable signals for live trading.
Protected Source / Closed-Source Clarification
Protected source does not mean "trust me blindly". It means the internal implementation is not publicly viewable.
The operational behavior is documented here: what is plotted, what each dashboard cell means, what each input controls, and how to interpret the output.
If you see re-uploads or near-identical copies elsewhere, treat them with caution and rely on the official publication.
Overview
Institutional Market Structure Pro (IMS Pro) is a comprehensive technical analysis indicator designed to help traders identify market structure shifts, momentum alignment, and statistical price extremes. It combines:
Smart Money Concepts (SMC) – Swing highs/lows, Change of Character (CHoCH), Break of Structure (BOS)
Higher Timeframe Momentum – MACD-based institutional bias from configurable HTF
Statistical Z-Score Analysis – Standard deviation bands identifying statistically extreme price levels
Trend Cloud – EMA-based short-term trend visualization
Confluence Scoring – Four-factor system combining all layers into actionable bias
The indicator was developed to address a common challenge: most retail traders struggle to identify when institutional order flow is shifting direction. By combining market structure analysis with higher timeframe momentum and statistical deviation measurements, IMS Pro helps traders see the market through an institutional lens.
What Makes It Original (Originality & Usefulness)
This script is not a simple mashup of SMC concepts. It is a coordinated workflow:
Market Structure Layer identifies swing highs, swing lows, and structural breaks (CHoCH and BOS) using configurable pivot detection
Momentum Layer analyzes higher timeframe MACD to determine institutional momentum bias with non-repainting implementation
Statistical Layer calculates Z-Score deviation bands to identify statistically extreme price levels where reversals are more likely
Confluence Scoring combines all layers into a single actionable bias score (STRONG BULL to STRONG BEAR)
When these three layers align, the indicator provides high-probability trading opportunities. The dashboard displays real-time confluence scoring so traders can quickly assess market conditions.
1) Chart Visuals – What You See on the Chart
A) Swing Highs and Swing Lows
The indicator identifies swing points using a configurable pivot detection algorithm:
Swing Highs – Red circles above the price level where they formed
Swing Lows – Green circles below the price level where they formed
Pivot Sensitivity – Controls how many bars are required to confirm a swing point (default: 10 bars)
Higher pivot sensitivity values result in fewer but more significant swing points. Lower values capture more swings but may include noise.
B) Change of Character (CHoCH)
A Change of Character occurs when price breaks a swing level in the opposite direction of the current trend, signaling a potential trend reversal:
Bullish CHoCH – Price breaks above a swing high while the market was previously in bearish structure. Displayed as a green dashed line with "CHoCH" label.
Bearish CHoCH – Price breaks below a swing low while the market was previously in bullish structure. Displayed as a red dashed line with "CHoCH" label.
CHoCH signals are significant because they indicate that the side previously in control (buyers or sellers) has lost dominance. These are often the first signs of a trend reversal.
C) Break of Structure (BOS)
A Break of Structure occurs when price breaks a swing level in the same direction as the current trend, confirming trend continuation:
Bullish BOS – Price breaks above a swing high while already in bullish structure. Displayed as a light green solid line with "BOS" label.
Bearish BOS – Price breaks below a swing low while already in bearish structure. Displayed as a light red solid line with "BOS" label.
BOS signals confirm that the current trend remains intact and the dominant side maintains control.
D) Z-Score Deviation Bands
Statistical bands showing price deviation from mean:
Upper Band (+2 sigma) – Light red line showing the overbought threshold
Lower Band (-2 sigma) – Light green line showing the oversold threshold
Mean Line – Gray line showing the statistical average price
Extreme Markers – Diamond shapes appear when price first enters extreme zones
Statistical Probability Context:
68% of price action occurs within +/- 1 standard deviation
95% of price action occurs within +/- 2 standard deviations
99.7% of price action occurs within +/- 3 standard deviations
When price reaches +/- 2 standard deviations, there is only a 5% probability of it moving further in that direction, making these levels statistically significant for potential reversals.
E) Trend Cloud
Visual representation of short-term trend direction using two EMAs (9 and 21):
Green Cloud – Fast EMA is above slow EMA, indicating bullish short-term momentum
Red Cloud – Fast EMA is below slow EMA, indicating bearish short-term momentum
F) HTF Momentum Background Tint
Subtle background coloring based on higher timeframe MACD:
Green Background Tint – Higher timeframe momentum is bullish (MACD line > signal line)
Red Background Tint – Higher timeframe momentum is bearish (MACD line < signal line)
No Tint – Momentum is neutral or the feature is disabled
2) IMS PRO Dashboard – Full Glossary
A compact table displays real-time summary of all analysis layers:
Header Row
Displays "IMS PRO" and current symbol
Color changes based on overall bias (green for bullish, red for bearish)
Row 1 – Structure
BULLISH : Higher highs and higher lows pattern
BEARISH : Lower highs and lower lows pattern
NEUTRAL : Mixed swings, ranging/consolidating market
Row 2 – HTF
Shows higher timeframe momentum bias with selected timeframe in parentheses
BULLISH : MACD line > signal line on HTF
BEARISH : MACD line < signal line on HTF
Row 3 – Z-Score
Displays current Z-Score value with color coding
Green for positive, red for negative
Bright colors for extreme values (beyond +/- 2)
Row 4 – Trend
UP : Fast EMA > Slow EMA
DOWN : Fast EMA < Slow EMA
RANGING : EMAs approximately equal
Row 5 – Overall Bias
STRONG BULL : Score +3 to +4 (all factors aligned bullish)
BULL : Score +1 to +2 (majority of factors bullish)
NEUTRAL : Score 0 (mixed signals)
BEAR : Score -1 to -2 (majority of factors bearish)
STRONG BEAR : Score -3 to -4 (all factors aligned bearish)
Row 6 – Swing High
Price level of the most recent swing high
Useful for stop loss and target placement
Row 7 – Swing Low
Price level of the most recent swing low
Useful for stop loss and target placement
3) How the Confluence Scoring Works (High-Level)
IMS Pro uses a four-factor confluence scoring system:
Market Structure (+1/-1) : Bullish structure adds +1, bearish structure adds -1
HTF Momentum (+1/-1) : Bullish HTF momentum adds +1, bearish adds -1
Trend Direction (+1/-1) : Uptrend adds +1, downtrend adds -1
Z-Score Position (+1/-1) : Z-Score above +0.5 adds +1, below -0.5 adds -1
Score Interpretation:
Score +3 to +4 = STRONG BULL – All factors aligned bullish
Score +1 to +2 = BULL – Majority of factors bullish
Score 0 = NEUTRAL – Mixed signals
Score -1 to -2 = BEAR – Majority of factors bearish
Score -3 to -4 = STRONG BEAR – All factors aligned bearish
Z-Score Calculation:
Z-Score = (Price - Mean) / Standard Deviation
Mean and StdDev calculated over configurable lookback period (default: 75)
Z-Score = 0 means price is at the mean
Z-Score = +2 means price is two standard deviations above mean (statistically overbought)
Z-Score = -2 means price is two standard deviations below mean (statistically oversold)
4) Inputs & Settings – Full Reference
Market Structure Settings
Pivot Sensitivity (default: 10): Number of bars to confirm swing points. Range: 2-50.
Show Last N Bars (default: 500): Limits historical display for performance.
Show Swing Highs : Toggle swing high markers.
Show Swing Lows : Toggle swing low markers.
Show CHoCH : Toggle Change of Character labels.
Show BOS : Toggle Break of Structure labels.
Swing High Color (default: red): Color for swing high markers.
Swing Low Color (default: green): Color for swing low markers.
Higher Timeframe Momentum Settings
Enable HTF Momentum : Toggle HTF analysis.
Higher Timeframe (default: 240/4H): Timeframe for momentum analysis.
MACD Fast Length (default: 12): Fast EMA period for MACD.
MACD Slow Length (default: 26): Slow EMA period for MACD.
MACD Signal Length (default: 9): Signal line period.
Show HTF Bias Background : Toggle background tint.
Bias Background Transparency (default: 92): Opacity of background tint.
Statistical Analysis Settings
Enable Z-Score Analysis : Toggle statistical analysis.
Z-Score Lookback (default: 75): Period for mean and standard deviation calculation.
Show Extreme Deviation Bands : Toggle +/- 2 sigma bands.
Extreme Z-Score Threshold (default: 2.0): Z-Score level considered extreme.
Visual Settings
Show Information Dashboard : Toggle dashboard display.
Dashboard Position (default: Top Right): Corner placement for dashboard.
Color Bars by Trend : Toggle bar coloring based on confluence.
Show Trend Cloud : Toggle EMA cloud display.
Cloud Transparency (default: 85): Opacity of trend cloud fill.
Alert Settings
Alert on CHoCH : Enable CHoCH alerts and visual markers.
Alert on BOS : Enable BOS alerts and visual markers.
Alert on Extreme Z-Score : Enable extreme zone alerts and markers.
5) Recommended Workflow (Practical Use)
Step 1: Identify Market Structure
Observe swing highs and swing lows to understand current structure
Higher highs + higher lows = Bullish structure
Lower highs + lower lows = Bearish structure
Mixed swings = Ranging/consolidating market
Step 2: Check Higher Timeframe Bias
Look at background tint and dashboard HTF reading
Trading with HTF momentum increases probability of success
Step 3: Wait for Structure Breaks
For trend reversals: Wait for CHoCH signals that align with HTF momentum
For trend continuation: Wait for BOS signals that confirm existing trend
Step 4: Consider Statistical Context
Avoid buying when Z-Score is extremely positive (overbought)
Avoid selling when Z-Score is extremely negative (oversold)
Look for reversals when price reaches extreme bands
Step 5: Assess Overall Confluence
STRONG BULL = High-probability long setups
STRONG BEAR = High-probability short setups
NEUTRAL = Wait for clearer signals
Recommended Timeframe Settings:
For 15-minute charts: Use 4H (240) higher timeframe
For 1-hour charts: Use Daily (D) higher timeframe
For 4-hour charts: Use Weekly (W) higher timeframe
6) Alerts
IMS Pro ships with alert conditions for:
Bullish CHoCH : Triggers when a bullish Change of Character is detected
Bearish CHoCH : Triggers when a bearish Change of Character is detected
Bullish BOS : Triggers when a bullish Break of Structure is detected
Bearish BOS : Triggers when a bearish Break of Structure is detected
Extreme Overbought : Triggers when Z-Score first exceeds the extreme threshold
Extreme Oversold : Triggers when Z-Score first drops below the negative extreme threshold
Bullish Confluence : Triggers when CHoCH + HTF Bullish + Oversold Z-Score align
Bearish Confluence : Triggers when CHoCH + HTF Bearish + Overbought Z-Score align
The confluence alerts are particularly valuable as they only trigger when multiple factors align, filtering out lower-probability setups.
7) Limitations & Best-Use Guidance
Market structure analysis works best in trending markets; may produce mixed signals in choppy conditions.
Higher timeframe data requires sufficient historical bars to calculate accurately.
Z-Score assumes normal distribution which may not hold during extreme market events.
Past structural patterns do not guarantee future price behavior.
The indicator is a tool for analysis, not a standalone trading system.
Always validate on your own symbols and timeframes before committing capital.
Best Practices:
Always trade in the direction of the higher timeframe momentum
Use CHoCH signals for potential reversals, BOS signals for continuations
Avoid entries when Z-Score is at extremes against your trade direction
Wait for STRONG BULL or STRONG BEAR confluence for highest probability trades
Adjust pivot sensitivity based on your trading timeframe (higher for swing trading, lower for day trading)
Use the swing high and swing low levels from the dashboard for stop loss and target placement
Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any trading methodology is not indicative of future results. Users should conduct their own research and consult with qualified financial advisors before making trading decisions. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Ale Tonkis Swing Failure + TP RRSwing Failure Pattern (SFP) indicator with multi-timeframe confirmation and dynamic Take Profit logic.
It detects bullish and bearish SFP setups, confirms them using 5m and 15m timeframes, and automatically plots Take Profit targets with a 1:2 or 1:3 risk–reward ratio, based on previous highs and lows (market structure pivots).
Designed for Forex and Crypto trading, fully visual and non-repainting.
FTFC (FULL TIMEFRAME CONTINUITY) STRATThe Strat FTFC Command Center is an all-in-one visual toolkit designed to eliminate the guesswork from Timeframe Continuity. Based on the teachings of Rob Smith, this indicator tracks the opening prices of 6 critical timeframes simultaneously. It provides a real-time "Command Center" (HUD) to monitor price distance from openings and identifies the exact "FTFC Thresholds" where the Daily, Weekly, and Monthly charts align for high-probability trade entries.
Note: 1 hour/60 minute timeframe should be taken into account for FTFC as per STRAT/Rob Smith as well, but most traders who trade STRAT watch 60 min timeframe so it's left to the discretion of the trader to watch whether or not the 60 min aligns with D, W, M and/or their trade plan or not.
Key Features
Dynamic FTFC Thresholds: Automatically calculates and draws the FTFC Green and FTFC Red lines. When price clears these levels, you have full continuity in your favor.
6-Timeframe HUD: A customizable table tracking the status (Bullish/Bearish) and price-distance for 1H, Daily, Weekly, Monthly, 3-Month, and 12-Month timeframes.
Opening Level Rays: Draws and labels automated horizontal rays for all major opening price levels.
Continuity Signal Dots: Visual "Go/No-Go" dots at the bottom of the chart that only illuminate when price achieves Full Timeframe Continuity (D, W, M green/red).
Customizable Settings Guide
1. Opening Level Rays
Show Opening Rays: Toggle the visibility of the 6 individual timeframe opens.
Ray Style/Color: Globally control the aesthetic of the level lines (Solid, Dotted, or Dashed).
Ray Label Offset: Move the text labels into the "future" (right of price) to keep the current price action clear.
Placement: Choose if labels sit Above, Below, or Centered on the line.
2. FTFC Thresholds (The "Triggers")
Show Threshold Lines: Toggles the thick Green/Red FTFC levels.
Independent Offset: Set a separate horizontal offset for these labels (e.g., keep them further to the right than standard rays for a visual hierarchy).
Label Toggle: Turn labels off while keeping the lines visible for a cleaner look.
3. UI & Table Customization
Table Position: Place the HUD in any of the 8 corners/sides of the chart.
Orientation: Switch between Vertical (list) and Horizontal (ribbon) layouts to match your screen real estate.
Size Toggles: Adjust the font/table size (Small, Normal, Large) and the Continuity Signal Dot size (Tiny, Small, Normal).
Risk Disclosure: Trading involves significant risk. This indicator is an analytical tool designed to visualize price action based on historical opening levels; it is not a financial advisor or a signal service. Past performance is not indicative of future results. Always use proper risk management and consult your own trading plan before executing entries. The author is not responsible for any financial losses incurred through the use of this script.
Weekly EMA Squeeze (Bullish + Bearish)Purpose
The Weekly EMA Squeeze indicator identifies periods where price is compressing tightly around a cluster of weekly EMAs and then flags when that compression resolves with directional bias. It is designed to surface high-timeframe inflection points where trends are most likely to begin or meaningfully change.
This indicator operates entirely on weekly data, even when viewed on lower timeframes.
________________________________________
Core Components
1. Weekly EMA Cluster
• Uses three weekly EMAs (fast / mid / slow)
• Compression is defined by:
o Tight EMA spread
o Reduced weekly volatility (ATR contraction)
• Represents balance and indecision at a higher timeframe
2. Bullish Weekly EMA Squeeze
Triggered when:
• EMAs are tightly compressed
• Price is holding above or within the EMA cluster
• EMA slopes flatten or turn upward (optional filter)
• Optional requirement: weekly close above EMA cluster
Displayed as:
• Green upward triangles
• Green vertical shaded band marking the squeeze event window
3. Bearish Weekly EMA Squeeze
Triggered when:
• EMAs are tightly compressed
• Price is holding below or within the EMA cluster
• EMA slopes flatten or turn downward (optional filter)
• Optional requirement: weekly close below EMA cluster
Displayed as:
• Red downward triangles
• Red vertical shaded band marking the squeeze event window
4. Vertical Shaded Event Bands
• Each squeeze event (bull or bear) is visually marked with a vertical shaded region
• Shading appears on every qualifying event, including consecutive ones
• Purpose: clearly identify when the market entered a compressed, directional decision state
________________________________________
What the Indicator Is Signaling
• Compression + directional bias, not immediate breakouts
• Transition points between:
o Range → trend
o Trend → reversal
o Trend → re-acceleration after consolidation
This indicator does not attempt to predict magnitude — it identifies timing and regime change risk.
________________________________________
How to Use It
Best used for:
• High-timeframe bias setting
• Filtering lower-timeframe signals
• Identifying when to stop fading price
• Recognizing when volatility expansion is likely
Typical interpretations:
• Bullish squeeze → bias shifts upward; favor long exposure
• Bearish squeeze → bias shifts downward; favor defensive or short exposure
• Multiple squeezes in same direction → trend reinforcement
• Rapid bull ↔ bear flips → higher-timeframe indecision
________________________________________
What It Is Not
• Not an entry trigger by itself
• Not a momentum oscillator
• Not a replacement for breakout confirmation
This indicator answers:
“Is the weekly market coiling, and in which direction is pressure building?”
Weekly Breakout Confirm + RS vs BTC + VolumePurpose
The Weekly Breakout Confirmation indicator validates whether price has structurally exited a prior weekly range and whether that breakout is supported by volume expansion and relative strength vs BTC.
It is a regime confirmation tool, designed to separate real breakouts from false ones.
________________________________________
Core Components
1. Weekly Donchian Channel
• Upper band (green): prior weekly range high
• Lower band (red): prior weekly range low
• Calculated on weekly data with no repainting
These levels define the structural range the market must escape to enter a new regime.
________________________________________
2. Weekly Breakout (W BO)
Triggered when:
• Weekly close breaks above the upper Donchian band
• Volume confirms expansion
• Optional filter: relative strength vs BTC is rising
Displayed as:
• Bullish breakout marker
• Green structure line remains on chart as reference
________________________________________
3. Weekly Breakdown (W BD)
Triggered when:
• Weekly close breaks below the lower Donchian band
• Volume confirms expansion
• Optional filter: relative strength vs BTC is weakening
Displayed as:
• Bearish breakdown marker
• Red structure line remains on chart as reference
________________________________________
4. Relative Strength vs BTC
• Measures asset performance relative to BTC on a weekly basis
• Helps identify:
o True altcoin leadership
o False breakouts driven only by BTC beta
• Optional requirement for breakout validation
________________________________________
5. Volume Confirmation
• Weekly volume must exceed a moving average threshold
• Filters out low-participation breakouts
• Ensures institutional-grade participation
________________________________________
What the Indicator Is Signaling
• Confirmed regime transitions
• Entry into:
o Sustained trends
o Distribution phases
o Structural breakdowns
Once a breakout is confirmed:
• The prior range is invalidated
• The green/red line becomes support/resistance reference, not a trigger
________________________________________
How to Use It
Best used for:
• Determining whether the market is trending or ranging
• Confirming whether weekly EMA squeezes are actionable
• Managing exposure duration and risk tolerance
Interpretation framework:
• W BO + rising RS + volume → trend acceptance
• W BO without RS → BTC-driven move (lower confidence)
• No recent W BO / W BD → consolidation regime
• W BD → risk-off, defensive posture
Over Night Hold Scanner Born InvestorOver Night Hold (ONH) Scanner - Daily Timeframe
Identifies high-probability overnight hold candidates based on Trader Stewie's methodology. Scans for explosive volume (2x+ average), strong closes in top 15% of range, and momentum context—regardless of your current chart timeframe.
Key Features:
Always reads from Daily chart data
Customizable data table (resizable, repositionable)
Volume ratio and close strength scoring
Price & liquidity filters ($3+ min, 1M+ volume)
Trend confirmation or reversal detection
EMA Buy/Sell & Smart Zones(5Min TF only)### **Indicator Title:**
**EMA Buy/Sell & Smart Zones**
---
### **Description:**
**EMA Buy/Sell & Smart Zones** is a specialized intraday trading tool designed to combine trend analysis with precise market structure zones. This script utilizes a custom tracking algorithm to identify the **specific candle** that formed the previous session's high or low, allowing it to plot accurate Supply and Demand zones for the current trading day.
This indicator has been rigorously tested on the **Nifty Index** and is optimized for use on the **5-minute timeframe**.
### **Key Features**
**1. Smart Session Wick Zones ("True Wick" Logic)**
The indicator automatically scans every candle of the previous session to locate the exact price action that formed the day's extremes.
* **Smart High Zone:** Identifies the specific candle that made yesterday's High and plots a zone from that High down to that candle's Open or Close (based on body direction).
* **Smart Low Zone:** Identifies the specific candle that made yesterday's Low and plots a zone from that Low up to that candle's Open or Close.
* **Close Range:** Highlights the High-Low range of the very last candle of the previous session to show the closing sentiment.
*All zones automatically stop extending at the end of the current session, ensuring the chart remains clean and historically accurate.*
**2. EMA Trend System**
The script plots three key Exponential Moving Averages to define market direction:
* **EMA 21:** Captures short-term momentum.
* **EMA 63:** Defines the medium-term trend.
* **EMA 1575:** Establishes the long-term baseline.
**3. Buy/Sell Signals**
Clear signals are generated on the chart based on specific criteria:
* **BUY Signal:** Generated when a green candle closes above the EMA 21 and EMA 63.
* **SELL Signal:** Generated when a red candle closes below the EMA 21 and EMA 63.
* *Note: The logic includes a filter to alternate signals (Buy -> Sell -> Buy), preventing clutter during choppy markets.*
### **How to Use**
* **Recommended Timeframe:** **5 Minutes**.
* **Recommended Markets:** Indices (Nifty, Bank Nifty) and high-volume stocks.
* **Workflow:**
* Use the **Smart Zones** (Red/Green boxes) to identify potential rejection areas or breakout targets.
* Use the **Buy/Sell Labels** as confirmation triggers when price is reacting near these zones or trending strongly above/below the EMAs.
### **Settings & Customization**
* **Visibility Control:** Toggle each box type (High, Low, Close) and text labels on or off individually.
* **Color Customization:** Fully adjustable colors for all EMAs, Zone Backgrounds, Borders, and Text Labels to suit your chart theme.
* **Label Size:** Adjust the text size of the zone labels directly from the settings menu.
---
**Disclaimer:** This tool is for educational purposes and should be used to assist your analysis. Always manage your risk appropriately.
Market Regime: Squeeze Box + Trend DashboardMarket Regime: Squeeze Box + Trend Dashboard
Market Regime is a overlay designed to provide instant market context (trend vs consolidation) and highlight volatility compression (squeeze) setups before potential breakouts. Built with stock charts in mind, it focuses on clean visuals and practical decision support.
What this indicator shows:
1) Market Regime (TREND / RANGE / NEUTRAL)
The regime is detected using DMI/ADX with built-in confirmation to reduce flicker:
TREND : ADX stays above a threshold for N bars
RANGE : ADX stays below a threshold for N bars
NEUTRAL : neither trend nor range is confirmed
Trend direction is derived from DI+ vs DI- (UP / DOWN / MIXED).
2) Squeeze (BB inside KC)
A squeeze is detected when Bollinger Bands contract inside Keltner Channels (volatility compression).
SQZ = squeeze start
REL = squeeze release (the first bar *after* squeeze — technically correct)
3) Squeeze Box
The core feature: a box drawn from SQZ → REL , dynamically tracking the highest high / lowest low during the squeeze. This creates a clean visual range for the compression zone and helps frame breakout context.
4) EMA Ribbon with ADX-based intensity
Two EMAs (fast/slow) form a ribbon. The fill becomes more pronounced as ADX strength increases, making trend momentum easier to read at a glance.
5) Trend Dashboard (corner panel)
A compact dashboard summarizing key metrics:
REGIME, DIR, ADX (with normalized strength %)
SQUEEZE ON/OFF
Relative Volume (relVol + tier)
ATR% (14), EMA Slope%, GAP% (Open vs previous Close)
Customization / Settings
Fully configurable for different styles and markets:
ADX/DMI lengths and thresholds
BB/KC parameters (lengths and multipliers)
Relative Volume thresholds
Background mode: Off / Squeeze only / All regimes
Visual toggles: ribbon, squeeze box, markers, dashboard
History controls and limits for boxes/labels (clean chart + performance)
How to use (practical workflow)
Trend context : read REGIME + DIR and ribbon intensity (ADX strength).
Squeeze setup : when squeeze is active, the box defines the compression range (high/low).
Release : REL marks the first bar after squeeze ends (potential breakout/expansion context).
Notes
No look-ahead logic is used; calculations rely on current and historical bars only.
On realtime (still-forming) candles, values can change intrabar, normal behavior for indicators computed on the current bar.
Trading Disclaimer:
This indicator is provided for research and informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Use at your own risk. You are solely responsible for any trading decisions made using this script.
Engulfing Candlestick ScannerThis Indicator is used to Identify Engulfing Candles. It work on any timeframe.






















