Multi-Confluence Signal Engine [MarkitTick]💡 A confluence-weighted signal engine that scores trend, momentum, volume, and market-structure conditions independently, then blends them into two composite 0–100 readings — a Bull Score and a Bear Score — to identify moments where multiple independent forces align in the same direction. Rather than reacting to one indicator crossing one line, this script asks four different questions about price behavior at once and only flags a signal when the weight of evidence clears a threshold you control.
✨ Originality and Utility
Most confluence or "confirmation" scripts on TradingView work by checking a fixed list of conditions and requiring all of them, or a majority of them, to be true — a rigid AND/OR gate. This script instead builds four independent sub-scores (Trend, Momentum, Volume, Structure), each internally weighted by the relative importance of its own components, and then combines those four legs using user-defined percentage weights into a single continuous score. The practical difference is that a trader can decide, for example, that market structure matters twice as much as volume for their instrument, and the engine will respect that priority mathematically rather than treating every condition as equally binary.
The engine does not stop at "yes/no." Each leg produces a 0–100 magnitude, visible individually on the dashboard, so a trader can see not just that a signal fired but which of the four legs was doing the heavy lifting. A signal driven primarily by Structure (a break of a swing high with rising highs and lows) has a different character than one driven primarily by Volume (a spike on an up-close candle), even if both produce the same final score. This decomposition is what separates the tool from a simple scoring checklist: the score is diagnostic, not just directional.
On top of scoring, the script layers a full trade-management shell: ATR-based stop placement, three R:R-defined take-profit levels, a minimum-bar-gap cooldown to prevent signal clustering, a minimum score-gap requirement between the bull and bear reading to avoid firing on a coin-flip, an optional higher-timeframe trend filter, and an optional ATR-based volatility filter to suppress signals during dead, choppy conditions. This turns a scoring model into a usable end-to-end signal-and-management framework rather than a standalone oscillator.
🔬 Methodology and Concepts
• Trend Leg
The trend component is built from three EMAs — Fast, Slow, and Macro — calculated with a manual recursive EMA function rather than the built-in, giving explicit control over the smoothing seed. Four conditions are checked: whether the Fast EMA sits above (or below) the Slow EMA, whether price trades above (or below) the Macro EMA, and whether the Fast and Slow EMA slopes (measured as simple rate-of-change over a lookback window) are rising or falling. Each condition contributes a fixed point value toward either the bullish or bearish trend sub-score, weighted so that the Fast/Slow EMA relationship and the price-vs-Macro relationship carry the most influence, with slope direction acting as a secondary confirmation.
• Momentum Leg
Momentum blends RSI positioning relative to a configurable midline, MACD line-vs-signal crossover state, and MACD histogram direction (rising or falling versus the prior bar). Each of the three contributes roughly a third of the momentum sub-score, meaning momentum only reads as strongly bullish or bearish when oscillator position, trigger-line relationship, and histogram acceleration all agree.
• Volume Leg
Volume scoring looks for two things: whether current volume exceeds a multiple of its moving average (a "spike") occurring on a candle that closed in the corresponding direction, and whether volume is simply expanding bar-over-bar in that same direction. A volume spike on a directional candle carries the larger weight, since an expanding-but-unspiked volume reading is a weaker signal of conviction than an outright surge.
• Structure Leg
This is a swing-based market-structure read. Pivot highs and lows are detected with a symmetric lookback window (a bar must be the extreme point within a window of bars on both sides to qualify), and the script tracks the two most recent pivot highs and two most recent pivot lows. A bullish structure state requires both the pivot highs and pivot lows to be printing progressively higher (higher highs, higher lows); a bearish state requires the mirror condition. Separately, the script tracks a "break of structure" — price closing beyond the last confirmed pivot high or low in a direction that differs from the currently tracked structural bias — as an additional, heavier-weighted structural signal.
• Composite Scoring
The four leg scores are combined using a weighted average, where the weights (Trend / Momentum / Volume / Structure) are fully configurable and normalized against their own sum, so the four percentages do not need to add to exactly 100 to remain internally consistent. The result is a Bull Score and a Bear Score, each independently ranging from 0–100, which are then bucketed into Strong, Medium, Weak, or None tiers based on two adjustable thresholds.
• Signal Confirmation Logic
A raw long or short condition requires the relevant score to clear the Medium threshold, the gap between the bull and bear scores to exceed a minimum separation (preventing signals when both sides are nearly tied), an optional higher-timeframe trend agreement check, an optional minimum-volatility check using ATR as a percentage of price, and a minimum bar-count since the last signal in that direction. Signals are only confirmed on a closed bar (barstate.isconfirmed), so the plotted signal state does not repaint on the current, still-forming bar.
• Higher-Timeframe Filter
When enabled, the script requests the prior, fully closed value of price and a slow EMA from a higher timeframe using an offset lookback, which is the standard non-repainting method for pulling higher-timeframe context — it deliberately reads the last confirmed HTF bar rather than the in-progress one, so this filter does not introduce forward-looking bias.
🎨 Visual Guide
• Heatmap Candles
When enabled, candle bodies, wicks, and borders are recolored using the Bull/Bear/Neutral color inputs based on which composite score currently leads and whether it clears the Medium tier — teal-family for a leading bull score at or above Medium, red-family for a leading bear score at or above Medium, and gray for anything below that threshold on both sides.
• EMA Lines
Three plotted lines track the Fast EMA (blue by default), Slow EMA (orange by default), and Macro EMA (purple by default). Their relative position and slope are the visual counterpart of the Trend Leg's underlying math.
• Score Labels
When a long signal fires, a label appears below that bar showing the rounded Bull Score. When a short signal fires, a label appears above that bar showing the rounded Bear Score. These give an at-a-glance read of how strong the triggering signal was without opening the dashboard.
• Trade Levels
On a confirmed signal, the script draws a full set of horizontal levels: a Stop-Loss line (red, with an "✕ SL" label), an Entry line (blue dashed, "▶ Entry" label), and three Take-Profit lines at increasing R:R multiples (teal dashed, "◆ TP1", "✦ TP2", "◆ TP3" labels, with opacity increasing from TP1 to TP3). Shaded fills connect Entry-to-Stop (risk zone) and Entry-to-TP3 (reward zone) so the risk/reward geometry is visible at a glance. These levels extend forward automatically as new bars form and are replaced whenever a fresh signal fires, unless the Lock Signal input is enabled, in which case the current level set is frozen and new signals are suppressed from redrawing them.
• Dashboard
An optional on-chart table (position configurable to any corner) summarizes, per bar: the current lock state, the Bull Score and Bear Score as filled progress bars with a percentage, the Bull Tier and Bear Tier classification, each of the four leg scores as its own progress bar, the current volume ratio versus its moving average, and the current ATR as a percentage of price. The progress bars use a three-color scale (teal / amber / red) based on how far the underlying reading sits from its maximum, giving a quick visual read of leg strength without needing to interpret raw numbers.
📖 How to Use
A long condition is flagged only when the Bull Score clears the Medium threshold, leads the Bear Score by at least the configured minimum gap, and passes whichever optional filters (HTF trend, volatility) are enabled — the mirror logic applies to short conditions. The dashboard's per-leg bars are useful for judging signal quality beyond the headline score: a Strong-tier signal backed by all four legs reading high is generally a more complete confluence than one where the composite score is inflated mostly by a single leg such as Volume.
The Lock Signal input is intended for reviewing a specific historical signal's levels without them being overwritten as price continues to move — enable it to freeze the current Entry/SL/TP level set in place, and disable it to resume normal level updates on the next fresh signal.
Because trade levels are geometric projections from ATR and R:R inputs at the moment of signal, not a guarantee of price reaching those levels, they should be read as a structured reference for planning position size and exits rather than a forecast.
⚙️ Inputs and Settings
• Core Settings
Strong and Medium thresholds define the score tiers; the Minimum Bars Gap enforces a cooldown between signals in the same direction; the Minimum Score Gap requires clear separation between Bull and Bear scores before either can fire; the four Leg Weight inputs control how much each of Trend, Momentum, Volume, and Structure contributes to the composite score.
• Trend Leg
Fast, Slow, and Macro EMA lengths, plus the lookback window used to measure EMA slope direction.
• Momentum Leg
RSI length and midline, plus MACD fast/slow/signal lengths.
• Volume Leg
The moving-average length volume is compared against, and the multiplier that defines a "spike."
• Structure Leg
The symmetric lookback window used to confirm a swing pivot high or low.
• Filters
Optional higher-timeframe trend agreement filter (with selectable timeframe) and an optional ATR-based minimum-volatility filter, each of which can independently suppress signals that would otherwise fire.
• Trade Tools
ATR multiplier for stop distance, R:R multiples for the three take-profit levels, a toggle to show or hide the drawn levels, and the Lock Signal toggle to freeze the current level set.
• Visuals
Toggles for heatmap candle coloring, EMA line visibility, and score labels on signals.
• Dashboard
Toggle to show or hide the on-chart summary table and a dropdown to choose which corner it docks to.
• Alerts
Custom text strings for the long, short, close-long, and close-short alert JSON payloads, letting the alert output be adapted to match the syntax expected by an external webhook or automation endpoint.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
• Trend-Following Theory
The EMA-based trend leg draws on the long-standing empirical observation, formalized in academic momentum and trend-following literature, that asset prices exhibit serial correlation over intermediate horizons — trends, once established, have historically had a higher-than-random probability of persisting over the following period. Dual and triple moving-average crossover systems are among the earliest systematized expressions of this idea, and the slope-of-the-average component reflects the concept of trend "velocity" used in later technical and quantitative trend-strength research.
• Oscillator and Convergence-Divergence Theory
RSI, developed by J. Welles Wilder, is grounded in the idea that the ratio of average gains to average losses over a lookback window reflects the relative strength of buying versus selling pressure, oscillating within bounds that can indicate overbought/oversold conditions or, as used here, simple directional bias relative to a midline. MACD, developed by Gerald Appel, formalizes convergence and divergence between two exponential averages of differing sensitivity; the histogram (the difference between the MACD line and its own signal line) captures acceleration or deceleration in that relationship, which is the specific behavior this script isolates when checking histogram direction.
• Volume-Price Confirmation Theory
The volume leg reflects classical Dow Theory and later volume-price-analysis principles holding that price moves accompanied by above-average volume carry more conviction than moves on thin volume, since volume is treated as a proxy for the degree of market participation and consensus behind a price change.
• Market Structure and Price-Action Theory
The structure leg operationalizes the concept of market structure as used in classical Dow Theory (a sequence of higher highs and higher lows defining an uptrend, and the reverse for a downtrend) and its more recent "break of structure" formalization in price-action and smart-money-concept methodologies, where a close beyond a prior swing point is treated as evidence of a shift in the controlling side of the market.
• Weighted Multi-Factor Aggregation
Combining independently normalized sub-scores via user-adjustable weights mirrors the logic of multi-factor models in quantitative finance, where distinct signal families (trend, momentum, volume, structure/mean-reversion) are each scored on a common scale and then blended, rather than relying on any single factor in isolation — the underlying premise being that signal families with low correlation to one another produce more robust composite readings than any single family alone.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. インジケーター

3EMA Filter [LTW]📈 3EMA Filter
This indicator visualizes real-time trend intensity using a multi-timeframe Exponential Moving Average (EMA) structure, projects future price trajectories based on momentum slopes, and quantifies fast-to-slow moving average divergence via an integrated real-time dashboard.
Instead of looking backward at static historical support and resistance levels on lower timeframes, you can instantly read real-time trend acceleration and price divergence right here and now to build powerful, forward-looking trading strategies.
⚙️ Key Features & Customization
▪️ Dynamic EMA Ribbon & Crossover Signals (Default: 50, 100, 200)
Utilizes dynamic colored ribbon filling between EMA 1, 2, and 3 to provide an immediate visual assessment of trend alignment (bullish/bearish) and momentum strength. Highlights Golden Cross and Dead Cross events between the fast and middle lines with distinct markers and optional background highlighting.
▪️ Slope-Based Future Trajectory Projection
Calculates the current momentum slope of each moving average at the latest bar to project future EMA trajectories 'n' bars forward. Allows traders to visually gauge whether trend momentum is currently accelerating or flattening out, aiding in the early detection of potential inflection points and trend reversals. (Supports customizable styles: Solid, Dotted, Dashed).
▪️ High-Visibility Divergence Dashboard
Automatically calculates and displays the Current, Maximum, and Minimum price divergence (%) between the fast moving average (EMA1) and the slow moving average (EMA3) over a selectable timeframe (1D, 1W, 1M). Engineered with a crisp, high-contrast design to immediately evaluate overbought and oversold market pressure across both Dark and Light themes.
▪️ Keep Charts Clean & Focus on Operability (Limit Display to Recent "n" Bars)
We approached this feature with the mindset of focusing on practical 'Operability' and responsiveness in real-time trading rather than just simple readability. By limiting the indicator display to the most recent 'n' bars, it reduces computational waste and eliminates visual clutter from historical bars, allowing you to react immediately to pure candlestick price action.
💡 How to Use & Trading Strategies
Provides a clean, forward-looking analytical framework that eliminates hindsight bias on lower timeframes.
1. Focusing on Acceleration & Divergence on Lower Timeframes
Unless you are analyzing macro moving averages like the 200-day or 200-week MAs on daily or weekly charts, tracing historical MA support and resistance lines on lower timeframes (such as intraday minute or hourly charts) often offers little practical synergy in real-time trading. This indicator departs from static historical mapping and is used strictly to read real-time "EMA Divergence" and the "Momentum Acceleration" of the current trend.
2. Preventing Curve-Fitting & Hindsight Bias (Hidden Picture Puzzles)
The integrated Bar Limit feature is deliberately designed to stop traders from falling into the trap of "playing hidden picture puzzles"—retroactively forcing indicators to fit historical price action. It eliminates hindsight bias, ensuring your analytical focus remains 100% locked on present market dynamics and future trajectory projections.
📌 Summary
A practical, all-in-one indicator designed to shift your focus away from static historical support/resistance and toward real-time trend acceleration and divergence. Through slope-based future projections, a high-visibility divergence dashboard, and an operability-focused Bar Limit feature, you can eliminate hindsight bias and trade with high reliability by focusing entirely on active market dynamics. インジケーター

DNSE VN301!, Keltner Break Out Strategy"Keltner Channel Breakout with SMA Trend Filter" is a trend-following breakout strategy designed to capture strong directional price movements after volatility expansions. The strategy uses the Keltner Channel, constructed from an EMA(20) and ATR(10), to identify bullish breakouts when price closes above the upper channel and bearish breakouts when price closes below the lower channel.
To improve signal quality, the strategy incorporates an optional SMA(200) trend filter, allowing Long trades only when the SMA is rising and Short trades only when it is falling. By combining volatility-based breakout detection with long-term trend confirmation, the strategy seeks to reduce false signals during ranging markets while participating in sustained intraday trends. It also includes configurable stop loss, take profit, trading session filters, and automatic end-of-day position closure for disciplined risk management.
Strategy settings and configuration:
Chart timeframe: recommended 1-minute chart
Position size: 3 contracts
Keltner EMA length: 20
ATR length: 10
ATR multiplier: 2.0
SMA length: 200
Stop loss: 10 points
Take profit: 20 points
SMA trend filter: On / Off
Take profit: On / Off
Time filter: On / Off
Trading session: 09:00 – 14:30
Trade direction: Long / Short / Both
Default script settings:
The strategy calculates the Keltner Channel using EMA(20) and ATR(10). The upper band is calculated by adding ATR multiplied by 2.0 to EMA(20). The lower band is calculated by subtracting ATR multiplied by 2.0 from EMA(20).
When the closing price breaks above the upper Keltner band, buying pressure may be taking control. When the closing price breaks below the lower Keltner band, selling pressure may be taking control.
When the SMA(200) trend filter is enabled, the script only allows Long trades when SMA(200) is rising and only allows Short trades when SMA(200) is falling. When the SMA filter is disabled, the strategy can trade both directions based only on Keltner Channel breakout signals.
Entry and exit rules:
Long entry:
Closing price > Upper Keltner Channel band
AND SMA(200) is rising, if the SMA filter is enabled
AND the signal appears during the trading session
AND trade direction allows Long entries
Long exit:
Stop loss: 10 points from entry price
Take profit: 20 points from entry price, if enabled
Opposite breakout signal appears
Reversal when a valid Short signal appears
Automatic position close at the end of the trading session
Short entry:
Closing price < Lower Keltner Channel band
AND SMA(200) is falling, if the SMA filter is enabled
AND the signal appears during the trading session
AND trade direction allows Short entries
Short exit:
Stop loss: 10 points from entry price
Take profit: 20 points from entry price, if enabled
Opposite breakout signal appears
Reversal when a valid Long signal appears
Automatic position close at the end of the trading session
Risk disclaimer:
Futures trading involves a high level of risk and prices can move sharply. This script is provided for reference, research, and backtesting purposes only. Users should fully understand derivatives trading, their own risk tolerance, and the strategy logic before applying it to live trading.
All investment decisions are the responsibility of the user. phaisinh.online is not responsible for any losses arising from the use of this strategy in real trading. Past performance does not guarantee future results.
_____________________________________________________________________
"Keltner Channel Breakout với Bộ lọc Xu hướng SMA" là chiến lược giao dịch theo xu hướng (trend-following) được thiết kế để nắm bắt các nhịp biến động mạnh của giá sau khi thị trường mở rộng biên độ dao động. Chiến lược sử dụng Keltner Channel, được xây dựng từ EMA(20) và ATR(10), để xác định tín hiệu bứt phá tăng khi giá đóng cửa vượt lên trên dải trên và tín hiệu bứt phá giảm khi giá đóng cửa xuống dưới dải dưới của kênh.
Để nâng cao chất lượng tín hiệu, chiến lược tích hợp bộ lọc xu hướng SMA(200) (có thể bật/tắt), chỉ cho phép mở vị thế Long khi SMA đang hướng lên và vị thế Short khi SMA đang hướng xuống. Bằng cách kết hợp tín hiệu breakout dựa trên biến động với xác nhận xu hướng dài hạn, chiến lược hướng tới việc giảm các tín hiệu nhiễu trong giai đoạn thị trường đi ngang, đồng thời tận dụng hiệu quả các xu hướng mạnh trong giao dịch trong ngày. Ngoài ra, chiến lược còn hỗ trợ các tính năng quản trị rủi ro như Stop Loss, Take Profit, bộ lọc thời gian giao dịch và tự động đóng vị thế trước khi kết thúc phiên để tránh rủi ro qua đêm.
Cài đặt & cấu hình chiến lược:
Biểu đồ: khuyến nghị khung 1 phút
Khối lượng giao dịch: 3 hợp đồng
Chu kỳ EMA Keltner: 20
Chu kỳ ATR: 10
Hệ số nhân ATR: 2.0
Chu kỳ SMA: 200
Cắt lỗ: 10 điểm
Chốt lời: 20 điểm
Bộ lọc xu hướng SMA: Bật / Tắt
Dùng chốt lời: Bật / Tắt
Bộ lọc giờ: Bật / Tắt
Khung giờ giao dịch: 09:00 – 14:30
Chiều giao dịch: Mua / Bán / Cả hai
Cài đặt mặc định của script:
Chiến lược tính toán Keltner Channel dựa trên đường EMA(20) và độ biến động ATR(10). Dải trên được tính bằng EMA(20) cộng ATR nhân hệ số 2.0. Dải dưới được tính bằng EMA(20) trừ ATR nhân hệ số 2.0.
Khi giá đóng cửa vượt lên trên dải trên Keltner, lực mua có thể đang chiếm ưu thế. Khi giá đóng cửa phá xuống dưới dải dưới Keltner, lực bán có thể đang chiếm ưu thế.
Khi bật bộ lọc xu hướng SMA(200), script chỉ cho phép lệnh Mua khi SMA(200) dốc lên và chỉ cho phép lệnh Bán khi SMA(200) dốc xuống. Khi tắt bộ lọc SMA, chiến lược có thể giao dịch cả hai chiều chỉ dựa trên tín hiệu breakout của Keltner Channel.
Điều kiện vào và thoát lệnh:
Vào lệnh Mua:
Giá đóng cửa > Dải trên Keltner Channel
VÀ SMA(200) dốc lên, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Mua
Thoát lệnh Mua:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
Có tín hiệu breakout ngược chiều
Đảo chiều khi xuất hiện tín hiệu Bán hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Vào lệnh Bán:
Giá đóng cửa < Dải dưới Keltner Channel
VÀ SMA(200) dốc xuống, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Bán
Thoát lệnh Bán:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
Có tín hiệu breakout ngược chiều
Đảo chiều khi xuất hiện tín hiệu Mua hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Tuyên bố rủi ro:
Giao dịch hợp đồng tương lai có mức độ rủi ro cao và giá có thể biến động mạnh. Script này chỉ phục vụ mục đích tham khảo, nghiên cứu và kiểm thử. Người dùng cần hiểu rõ giao dịch phái sinh, khẩu vị rủi ro cá nhân và logic của chiến lược trước khi áp dụng vào giao dịch thực tế.
Mọi quyết định đầu tư thuộc trách nhiệm của người dùng. phaisinh.online không chịu trách nhiệm cho bất kỳ khoản lỗ nào phát sinh từ việc sử dụng chiến lược này trong giao dịch thực tế. Hiệu quả trong quá khứ không đảm bảo kết quả trong tương lai.
ストラテジー

[Kpt-Ahab] Moving Average Simple AlgoPilotImportant Notice and Risk Warning
The published settings were selected exclusively based on historical data for the asset and timeframe shown.
The displayed result may be random or over-optimized and cannot automatically be transferred to other assets, timeframes, or future market conditions. Even with the presented settings, the strategy may cause significant losses at any time, including the complete loss of the allocated strategy capital.
This script is intended exclusively for analysis and testing purposes. It does not constitute investment advice or a trading recommendation.
Description
This script uses reused and adapted code components from ** Auto RiskManagement & Backtest System 2.1b** and the ** Moving Average Alarm Output **.
These components have been combined into a standalone strategy that integrates moving-average signals with position management, risk management, and backtesting functions.
How It Works
The strategy uses two freely configurable moving averages. **SMA, EMA, WMA, VWMA, or HMA** can be selected independently for the short and long moving averages.
A long signal is generated when the short moving average crosses above the long moving average. A short signal is generated when the short moving average crosses below the long moving average.
The moving averages are displayed directly on the chart. An additional colored area visualizes the position of the price relative to the long moving average. Its intensity changes according to the distance between the two moving averages.
Position and Risk Management
The script supports, among other features:
* Long and short positions
* Fixed or trailing stop-loss levels
* Multiple partial profit targets
* A final profit target
* Breakeven after the first profit target
* Optional additional entries
* Drawdown and losing-trade limits
* Internal or external trading signals
* Different position-sizing methods
Additional entries and simulated leverage may significantly increase the risk of loss.
Backtest Limitations
Strategy Tester results are based exclusively on historical market data. Real-world results may differ significantly due to commissions, spreads, slippage, liquidity, price gaps, and execution delays.
Past performance is not a reliable indication of future results.
Signals During an Open Position
The **Open Position Signals** setting determines how new signals are handled while a position is already open:
* **Wait-End-Deal:** All new moving-average signals are ignored until the current position has been closed by a profit target, stop-loss, or another protective function.
* **Wait-Reversal:** An opposing moving-average signal may close the currently open position.
With **Wait-Reversal**, a sell signal closes a long position, while a buy signal closes a short position. The opposing signal does not automatically open a new position during the same step.
Price-based additional entries remain independent of this setting and may still be executed when enabled.
Stop-Loss, Trailing Stop, Breakeven, and Liquidation Line
The strategy supports both a fixed stop-loss and a trailing stop. The selected percentage represents the direct price distance from the average entry price and is not automatically adjusted by the simulated leverage.
In **FIXED %** mode, the stop is calculated from the current average entry price. If the average entry price changes due to an additional entry, the stop is recalculated accordingly.
In **TRAILING** mode, the stop only moves in a direction that is favorable to the position. If the average entry price changes due to an additional entry, the existing trailing stop is adjusted accordingly.
The stop may optionally be moved to the average entry price after the first profit target has been reached. A stop mode must be enabled for this breakeven function to operate.
The displayed liquidation line is only an internal estimate based on the simulated position and account values. It may differ significantly from the actual liquidation calculation used by a broker or exchange.
Using External Indicators
An external numerical signal source may be used instead of the integrated moving-average signals.
The external indicator must provide a selectable plot series containing the following values:
* **+1:** Long or buy signal
* **−1:** Short or sell signal
All other values, including `na`, produce no new signal.
The external indicator must output the required numerical values through a selectable plot. This plot can then be selected under **External Source**.
How an external signal is processed while a position is already open also depends on the selected **Open Position Signals** setting.
Wichtiger Hinweis und Risikowarnung
Die veröffentlichten Einstellungen wurden ausschließlich anhand historischer Daten für das dargestellte Asset und den verwendeten Zeitrahmen gewählt.
Das Ergebnis kann zufällig oder überoptimiert sein und lässt sich nicht automatisch auf andere Assets, Zeitrahmen oder zukünftige Marktphasen übertragen. Auch mit den dargestellten Einstellungen kann die Strategie jederzeit erhebliche Verluste verursachen und das eingesetzte Strategiekapital vollständig verlieren.
Dieses Skript dient ausschließlich zu Analyse- und Testzwecken und stellt keine Anlageberatung oder Handelsempfehlung dar.
Beschreibung
Dieses Skript verwendet wiederverwendete und angepasste Codebestandteile aus ** Auto RiskManagement & Backtest System 2.1b** und dem ** Moving Average Alarm Output **.
Die Komponenten wurden zu einer eigenständigen Strategie verbunden, die Moving-Average-Signale mit Positions-, Risiko- und Backtestfunktionen kombiniert.
Funktionsweise
Die Strategie verwendet zwei frei konfigurierbare gleitende Durchschnitte. Für den kurzen und den langen Moving Average können jeweils **SMA, EMA, WMA, VWMA oder HMA** ausgewählt werden.
Ein Long-Signal entsteht, wenn der kurze Moving Average den langen Moving Average von unten nach oben kreuzt. Ein Short-Signal entsteht bei einer Kreuzung von oben nach unten.
Die Moving Averages werden direkt im Chart dargestellt. Eine zusätzliche farbliche Fläche visualisiert die Position des Kurses relativ zum langen Moving Average. Die Intensität der Darstellung verändert sich abhängig vom Abstand zwischen den beiden Moving Averages.
Positions- und Risikomanagement
Das Skript unterstützt unter anderem:
* Long- und Short-Positionen
* feste oder nachlaufende Stop-Loss-Marken
* mehrere Teilgewinnziele
* ein abschließendes Gewinnziel
* Breakeven nach dem ersten Gewinnziel
* optionale zusätzliche Einstiege
* Drawdown- und Verlustserienbegrenzungen
* interne oder externe Handelssignale
* unterschiedliche Methoden zur Bestimmung der Positionsgröße
Zusätzliche Einstiege und ein simulierter Hebel können das Verlustrisiko deutlich erhöhen.
Einschränkungen des Backtests
Die Ergebnisse des Strategietesters basieren ausschließlich auf historischen Kursdaten. Reale Ergebnisse können durch Gebühren, Spread, Slippage, Liquidität, Kurslücken und Ausführungsverzögerungen erheblich abweichen.
Vergangene Ergebnisse sind kein verlässlicher Hinweis auf zukünftige Ergebnisse.
Signale während einer offenen Position
Über **Open Position Signals** wird festgelegt, wie neue Signale während einer bereits geöffneten Position behandelt werden:
* **Wait-End-Deal:** Alle neuen Moving-Average-Signale werden ignoriert, bis die aktuelle Position durch ein Gewinnziel, einen Stop-Loss oder eine andere Schutzfunktion beendet wurde.
* **Wait-Reversal:** Ein entgegengesetztes Moving-Average-Signal kann die aktuell geöffnete Position schließen.
Bei **Wait-Reversal** schließt ein Verkaufssignal eine Long-Position und ein Kaufsignal eine Short-Position. Das entgegengesetzte Signal eröffnet dabei nicht automatisch im selben Schritt eine neue Position.
Preisbasierte zusätzliche Einstiege bleiben von dieser Auswahl unabhängig und können weiterhin ausgeführt werden, sofern sie aktiviert sind.
Stop-Loss, Trailing-Stop, Breakeven und Liquidationslinie
Die Strategie unterstützt einen festen Stop-Loss sowie einen nachlaufenden Trailing-Stop. Der eingestellte Prozentwert beschreibt den direkten Kursabstand zum durchschnittlichen Einstiegspreis und wird nicht automatisch durch den simulierten Hebel verändert.
Im Modus **FIXED %** wird der Stop anhand des aktuellen durchschnittlichen Einstiegspreises berechnet. Verändert sich dieser durch einen zusätzlichen Einstieg, wird auch der Stop neu berechnet.
Im Modus **TRAILING** wird der Stop nur in eine für die Position günstigere Richtung nachgezogen. Verändert sich der durchschnittliche Einstiegspreis durch einen zusätzlichen Einstieg, wird der bestehende Trailing-Stop entsprechend angepasst.
Optional kann der Stop nach dem Erreichen des ersten Gewinnziels auf den durchschnittlichen Einstiegspreis verschoben werden. Für diese Breakeven-Funktion muss ein Stop-Modus aktiviert sein.
Die angezeigte Liquidationslinie ist lediglich eine interne Schätzung auf Basis der simulierten Positions- und Kontowerte. Sie kann deutlich von der tatsächlichen Liquidationsberechnung eines Brokers oder einer Börse abweichen.
Verwendung externer Indikatoren
Anstelle der integrierten Moving-Average-Signale kann eine externe numerische Signalquelle verwendet werden.
Der externe Indikator muss eine auswählbare Plot-Serie mit den folgenden Werten bereitstellen:
* **+1:** Long- beziehungsweise Kaufsignal
* **−1:** Short- beziehungsweise Verkaufssignal
Bei allen anderen Werten oder bei `na` wird kein neues Signal ausgelöst.
Der externe Indikator muss die benötigten Zahlenwerte direkt über einen auswählbaren Plot ausgeben. Dieser Plot kann anschließend unter **External Source** ausgewählt werden.
Wie ein externes Signal während einer bereits geöffneten Position verarbeitet wird, hängt zusätzlich von der gewählten Einstellung unter **Open Position Signals** ab.
ストラテジー

Jurik Moving Average Approximation🚀 JURIK MOVING AVERAGE APPROXIMATION (JMA)
The Jurik Moving Average Approximation (JMA) , engineered by gunebak4n , is an advanced, ultra-low lag, adaptive noise-reduction indicator framework designed for TradingView. Built upon the legendary signal-processing principles conceptualized by Mark Jurik (Jurik Research) , this open-source implementation resolves the classical moving average tradeoff between lag and smoothness—delivering crisp, real-time trend tracking without erratic price oscillations or excessive signal delay.
Standard moving averages (such as SMA, EMA, or WMA) suffer from a fundamental lag-vs-noise dilemma: lengthening the period removes noise but introduces severe lag, while shortening the period reduces lag at the expense of excessive whipsaws. JMA overcomes this limitation by utilizing an adaptive, multi-stage recursive filtering process combined with a dynamic phase-adjustment mechanism. The result is an ultra-smooth, responsive curve that reacts instantly to sharp breakouts and price gaps while remaining stable during choppy, sideways consolidation.
💡 CORE DESIGN PRINCIPLES
🧭 Eliminating the Lag vs. Noise Dilemma
Conventional moving averages lag behind sudden market moves—especially during aggressive gaps or volatility expansions. JMA acts as a near-ideal noise filter: it tracks price action with minimal temporal delay while suppressing high-frequency market noise that leads to false signals.
🎛️ Fine-Tuned Phase & Power Control
Unlike standard averages that offer only a period setting, JMA provides modular fine-tuning controls:
• Phase (-100 to +100): Adjusts the balance between lag reduction and overshoot prevention. Positive values accelerate responsiveness for fast-moving markets, while negative values increase smoothness.
• Power: Controls the acceleration exponent of the smoothing curve, allowing traders to customize how aggressively the filter adapts to price velocity.
🌐 Native Multi-Timeframe (MTF) Capability
Equipped with Pine Script v5 multi-timeframe evaluation engines ( timeframe parameter), JMA enables you to seamlessly overlay higher-timeframe trend lines (e.g., Daily or Weekly JMA) onto lower-timeframe execution charts without breaking visual layout or causing repainting.
💡 KEY FEATURES
• Ultra-Low Lag Adaptive Tracking: Captures rapid price breakouts and market gaps instantaneously, giving traders earlier macro directional bias compared to traditional exponential or weighted moving averages.
• Dynamic Trend & Bar Coloring: Includes an optional visual execution engine that dynamically colors both the JMA line and chart price bars based on real-time trend direction (Bullish = Green, Bearish = Red).
• Integrated Alert System: Features pre-configured, non-repainting alertcondition events for bullish and bearish trend flips, enabling instant mobile notifications or webhooks for automated trading workflows.
🔬 MATHEMATICAL ARCHITECTURE
• Beta Coefficient: Beta = (0.45 * (Length - 1)) / (0.45 * (Length - 1) + 2.0)
• Alpha Coefficient: Alpha = Beta ^ Power
• Phase Ratio (PR): Mapped from Phase input (-100 to +100) into range
• Stage 1 (Raw Smoothing): e0 = (1 - Alpha) * Source + Alpha * e0
• Stage 2 (Trend Detrending): e1 = (Source - e0) * (1 - Beta) + Beta * e1
• Stage 3 (Phase-Adjusted Offset): e2 = (e0 + PR * e1 - JMA ) * (1 - Alpha)^2 + Alpha^2 * e2
• JMA_Current = JMA_Previous + e2
🛠️ USAGE FRAMEWORK
1. Trend Bias & Macro Axis
• Green JMA Line / Green Bars: Bullish regime. Focus on long entries, trend continuations, or buying pullbacks toward the JMA line.
• Red JMA Line / Red Bars: Bearish regime. Focus on short entries, trend continuations, or selling relief rallies toward the JMA line.
2. Dynamic Support & Resistance / Trailing Stop
Due to its low-lag and ultra-smooth profile, JMA functions as an exceptional dynamic trailing stop-loss boundary during sustained trend movements, preventing premature exits caused by minor intraday noise.
3. Replacement Proxy for Oscillators
Standard indicators (MACD, RSI, Stochastics) often generate false crossovers when calculated using raw price or EMAs. Passing the smoothed JMA output into these classical formulas yields significantly cleaner, higher-conviction oscillator signals.
⚙️ SYSTEM CHARACTERISTICS
• Zero Repainting: All calculations strictly evaluate on closed historical bar states.
• Fully Parameterized Inputs: Customize source price, length, phase, power, bar coloring, and color themes.
• Asset-Agnostic Engine: Operates with high precision across Equities, Forex, Crypto, Commodities, Futures, and Indices.
• Clean & Modern UI: Designed for high visual clarity on both dark and light chart themes.
📌 CREDIT & ATTRIBUTION
The Jurik Moving Average Approximation script is engineered and published by gunebak4n on TradingView.
This indicator is based on the mathematical concepts of the Jurik Moving Average (JMA) originally conceptualized by Mark Jurik (Jurik Research) .
⚠️ DISCLAIMER
This script is an open-source community implementation and mathematical approximation of the JMA concept. It is not affiliated with, officially supported by, or endorsed by Mark Jurik or Jurik Research. This indicator is a technical analysis visualization tool and does not provide financial advice, automated trading signals, or profit guarantees. Always perform thorough backtesting and practice strict risk management. インジケーター

Innovation-Gated Hull Supertrend [BackQuant] Innovation-Gated Hull Supertrend
Overview
Innovation-Gated Hull Supertrend is an adaptive trend-following overlay that combines three distinct signal-processing components:
A Hull Moving Average projection for responsive trend estimation.
An innovation-gated recursive filter for adaptive noise reduction.
A volatility-based Supertrend applied to the filtered Hull estimate.
The indicator is designed to behave differently during quiet and active market conditions.
When the Hull estimate changes only slightly relative to recent volatility, the innovation gate restricts how much of that movement is admitted into the filtered trend estimate. The Supertrend bands can also expand during these quieter conditions, reducing sensitivity to minor fluctuations.
When a larger and statistically more meaningful change occurs, the gate opens. The recursive filter becomes more responsive, the Supertrend bands return closer to their base width, and the model is allowed to react more quickly.
The result is a trend framework that attempts to balance two competing requirements:
Remain stable when price movement is small and noisy.
Respond more quickly when new information produces a meaningful displacement.
The indicator does not predict future prices. It is a causal trend model that adapts its response according to the size of newly arriving information relative to the current volatility environment.
Core calculation chain
The complete calculation can be summarised as:
Calculate a Hull Moving Average projection from the selected price source.
Estimate current volatility using ATR, standard deviation, or a blend of both.
Compare the Hull projection with the recursive filter’s previous estimate.
Normalise that difference by volatility to calculate an innovation score.
Pass the score through a smooth logistic gate.
Use the gate to adapt the recursive filter’s measurement and process uncertainty.
Generate the innovation-filtered Hull estimate.
Optionally adapt the Supertrend band multiplier using the same gate.
Apply Supertrend logic around the filtered Hull estimate.
Generate bullish and bearish regime changes when the Supertrend changes sides.
Each stage solves a different problem.
The Hull projection provides a responsive directional input. The innovation filter decides how much of that input should be trusted. The Supertrend then converts the filtered estimate into a persistent trailing regime.
Historical background
The indicator combines ideas from several areas of technical analysis and signal processing.
Hull Moving Average
The Hull Moving Average was developed by Alan Hull as a method of reducing lag while preserving a smooth output.
Traditional moving averages face a basic trade-off:
Short averages respond quickly but contain more noise.
Long averages are smoother but react later.
The Hull Moving Average attempts to improve this balance by combining weighted moving averages of different lengths.
Its general construction is:
Fast WMA = WMA of price over approximately half the main length.
Slow WMA = WMA of price over the full length.
Raw Hull = 2 × Fast WMA - Slow WMA.
Final Hull = WMA of the Raw Hull over the square root of the main length.
The subtraction stage compensates for some of the delay introduced by the longer average. The final square-root smoothing stage reduces noise in the compensated series.
Recursive estimation and the Kalman-filter principle
The innovation filter is based on the general recursive-estimation framework associated with Kalman filtering.
The Kalman filter was developed by Rudolf E. Kálmán and became widely used in engineering, navigation, aerospace, robotics and control systems.
A recursive estimator typically follows two stages:
Predict the current state from the previous state.
Correct that prediction using the newest observation.
The correction depends on how uncertain the model is and how reliable the new observation is believed to be.
The difference between the observation and prediction is called the:
Innovation
In this indicator:
The observation is the current Hull projection.
The prediction is the previous filtered estimate.
The innovation is the difference between them.
A large innovation means the Hull projection has moved significantly away from the model’s prior estimate.
A small innovation means the new observation is close to what the model already expected.
Supertrend
Supertrend is a volatility-trailing concept built from an underlying price reference and ATR-based bands.
Its basic structure consists of:
An upper band above the reference.
A lower band below the reference.
One-sided trailing behaviour.
A regime switch when price crosses the opposing band.
In a bullish regime, the lower band acts as the active trail.
In a bearish regime, the upper band acts as the active trail.
This indicator modifies the conventional approach in two important ways:
The central reference is the innovation-filtered Hull estimate rather than a normal price midpoint.
The band multiplier can adapt according to the innovation gate.
Stage 1: Hull projection
The first stage calculates the Hull projection from the selected price source.
The script determines:
The full Hull length.
A half-length rounded to a valid integer.
A square-root length rounded to a valid integer.
It then calculates:
Fast WMA = WMA(source, half length)
Slow WMA = WMA(source, full length)
Raw Hull = 2 × Fast WMA - Slow WMA
Hull Projection = WMA(Raw Hull, square-root length)
The Hull projection is more responsive than many conventional moving averages of a similar nominal length.
However, responsiveness also means it can react to short-lived movements. For that reason, the Hull projection is not used directly as the final trend line. It becomes the observation supplied to the innovation filter.
Hull Length
The Hull Length controls the underlying trend horizon.
Lower values:
React more quickly.
Follow shorter trend legs.
Produce more local changes.
Admit more short-term noise into the next stage.
Higher values:
Produce a smoother projection.
Focus on broader trend structure.
Respond later to sudden reversals.
The Hull Length therefore controls the basic timescale of the model before any adaptive filtering or Supertrend logic is applied.
Stage 2: Volatility model
The innovation must be interpreted relative to current market conditions.
A movement of 10 points may be large in a quiet market but insignificant in a highly volatile market.
The indicator therefore normalises the innovation using a selectable volatility estimate.
Three modes are available:
ATR
Standard Deviation
Blend
ATR mode
Average True Range measures recent trading range while accounting for gaps from the previous close.
True Range is based on the greatest of:
Current high minus current low.
Absolute current high minus previous close.
Absolute current low minus previous close.
ATR then smooths True Range across the selected Volatility Length.
ATR is useful because it measures the realised movement range of the instrument.
It is sensitive to:
Wide candles.
Price gaps.
Range expansion.
Standard Deviation mode
Standard deviation measures how widely the Hull projection has varied around its recent mean.
It is a dispersion measure rather than a range measure.
Standard deviation responds to:
Variation in the selected series.
Directional displacement.
Changes in the distribution of the filtered input.
While ATR focuses on bar range, standard deviation focuses on dispersion of the Hull series itself.
Blend mode
Blend mode calculates the average of ATR and standard deviation.
Conceptually:
Blended Volatility = (ATR + Standard Deviation) / 2
This provides a combined estimate incorporating:
Observed range behaviour.
Statistical dispersion of the Hull projection.
Neither measure is universally superior. The blend attempts to reduce dependence on only one definition of volatility.
Volatility Length
The Volatility Length controls how quickly the normalisation baseline changes.
Lower values:
React faster to recent volatility changes.
Cause the innovation score to adjust more quickly.
May make the gate less stable.
Higher values:
Produce a slower volatility baseline.
Create more consistent normalisation.
May respond later when volatility changes abruptly.
The volatility estimate is prevented from falling below the instrument’s minimum tick size, avoiding unstable division during extremely quiet periods.
Stage 3: Innovation calculation
The filter begins each bar with a prediction.
In this implementation, the prediction is the previous filtered estimate.
The innovation is:
Innovation = Hull Projection - Previous Filter Estimate
The innovation may be positive or negative.
A positive value means the Hull projection is above the prior estimate.
A negative value means it is below the prior estimate.
The absolute innovation measures the size of the disagreement regardless of direction.
Innovation score
The raw innovation is normalised by current volatility:
Innovation Score = |Innovation| / Volatility
This expresses the new movement in volatility units.
For example:
A score of 0.25 means the innovation is approximately one quarter of the selected volatility measure.
A score of 1.00 means it is approximately equal to that volatility measure.
A score above 1.00 means the change is larger than the current volatility baseline.
The score is dimensionless, making it more comparable across instruments and price scales.
This is the key quantity used to determine whether the filter should remain cautious or become more responsive.
Stage 4: Logistic innovation gate
The innovation score is passed through a logistic function.
The logistic function has the form:
Gate = 1 / (1 + exp(-x))
Its output remains between zero and one.
In the indicator, the gate input depends on:
Innovation Score
Innovation Threshold
Gate Sharpness
Conceptually:
Gate Input = Sharpness × (Score - Threshold)
When the score is below the threshold:
The gate approaches zero.
The filter treats the new Hull movement cautiously.
When the score rises above the threshold:
The gate moves toward one.
The filter becomes more willing to admit the new movement.
The logistic function creates a smooth transition rather than a hard on/off switch.
This is important because a binary threshold could cause abrupt changes whenever the score moves slightly above or below one exact value.
Innovation Threshold
The Innovation Threshold determines where the gate begins moving from a quiet state toward an active state.
Higher values:
Require a larger volatility-normalised innovation.
Keep the filter conservative for longer.
Reject more moderate changes.
Lower values:
Open the gate sooner.
Increase responsiveness.
Allow smaller movements to influence the estimate.
The threshold should be interpreted in relation to the selected volatility model.
Gate Sharpness
Gate Sharpness controls how rapidly the logistic gate transitions around the threshold.
Lower sharpness:
Creates a gradual transition.
Produces a wider intermediate region.
Changes responsiveness smoothly.
Higher sharpness:
Makes the gate behave more like a hard switch.
Creates a faster transition near the threshold.
Produces stronger separation between quiet and active states.
An extremely high value can make the adaptive behaviour abrupt, while a low value may reduce the distinction between quiet and active conditions.
Admission Floor
The gate is converted into an admission value.
The Admission Floor ensures that the filter never completely ignores the Hull projection.
The admission calculation is:
Admission = Floor + (1 - Floor) × Gate
When the gate is near zero:
Admission remains near the selected floor.
When the gate is near one:
Admission approaches one.
A lower floor creates stronger filtering during quiet conditions.
A higher floor keeps the model more responsive even when innovation is small.
This setting prevents the estimator from becoming fully frozen.
Stage 5: Adaptive recursive update
The admission and gate values modify two uncertainty terms:
Measurement noise.
Process noise.
These terms control how the recursive filter balances its existing estimate against the new Hull observation.
Measurement Noise
Measurement Noise represents uncertainty in the incoming Hull projection.
Higher measurement noise tells the filter:
Trust the new observation less.
Remain closer to the previous estimate.
Produce more smoothing.
Lower measurement noise tells the filter:
Trust the Hull projection more.
Correct the estimate more aggressively.
Become more responsive.
The script adapts measurement noise using the admission value:
Adaptive Measurement Noise = Base Measurement Noise / Admission
When admission is low:
Measurement noise increases.
The new Hull movement receives less weight.
When admission is high:
Measurement noise moves closer to its base value.
The filter becomes more receptive.
Process Noise
Process Noise represents uncertainty in the filter’s current state model.
Higher process noise tells the estimator:
The underlying trend may be changing.
The previous estimate may no longer be reliable.
Allow faster adaptation.
Lower process noise tells it:
Assume the existing state remains relatively stable.
Change the estimate more cautiously.
The script increases process noise as the gate opens:
Adaptive Process Noise = Base Process Noise × (1 + Process Boost × Gate)
This creates a two-sided adaptive response.
During quiet conditions:
Measurement noise increases.
Process noise remains closer to its base level.
The filter resists small changes.
During high-innovation conditions:
Measurement noise decreases toward its normal value.
Process noise increases.
The filter becomes substantially more responsive.
Process Boost
Process Boost controls how strongly the process uncertainty expands when the gate opens.
Higher values:
Allow faster response to large innovations.
Increase the filter gain during active movement.
Can make the model more sensitive after shocks.
Lower values:
Keep behaviour closer to the base recursive filter.
Produce more controlled adaptation.
May respond more slowly to genuine regime changes.
Covariance and filter gain
The recursive filter maintains an internal covariance representing uncertainty in its estimate.
Before the new observation is processed:
Predicted Covariance = Previous Covariance + Adaptive Process Noise
The filter gain is then:
Gain = Predicted Covariance / (Predicted Covariance + Adaptive Measurement Noise)
The gain remains between zero and one.
A low gain means:
The previous estimate receives more influence.
The Hull observation receives less influence.
A high gain means:
The filter moves more strongly toward the current Hull projection.
The new estimate is:
Filtered Hull = Prediction + Gain × Innovation
The covariance is then updated for the next bar.
Why the filter is innovation-gated
A normal recursive filter may use constant process and measurement noise settings.
That means its responsiveness is broadly fixed.
This indicator changes those terms according to the size of the innovation.
The model therefore behaves differently under two broad conditions.
Quiet condition
When the Hull projection remains close to the prior estimate relative to volatility:
Innovation score is low.
Gate remains mostly closed.
Admission is limited.
Adaptive measurement noise rises.
Process noise remains lower.
Filter gain falls.
The filtered Hull changes more slowly.
Active condition
When the Hull projection moves meaningfully away from the prior estimate:
Innovation score rises.
Gate opens.
Admission approaches one.
Measurement noise decreases.
Process noise increases.
Filter gain rises.
The estimate adapts more quickly.
This allows the model to filter small movement without applying the same degree of resistance to every large move.
Stage 6: Innovation-adaptive Supertrend bands
The filtered Hull becomes the centre of the Supertrend calculation.
The initial raw bands are:
Upper Band = Filtered Hull + Factor × ATR
Lower Band = Filtered Hull - Factor × ATR
The Supertrend uses its own ATR Period, which is independent of the volatility length used by the innovation score.
This distinction is important:
Innovation volatility determines whether the filter should admit new information.
Supertrend ATR determines the distance of the trailing regime bands.
Adaptive band factor
When Adapt Bands With Innovation is enabled, the Supertrend factor changes according to the gate.
The adaptive factor is:
Adaptive Factor = Base Factor ×
When the gate is near one:
The adaptive factor approaches the base factor.
Bands become relatively tighter.
The Supertrend can respond more readily.
When the gate is near zero:
The factor expands above its base value.
Bands become wider.
Minor price fluctuations are less likely to cause a reversal.
This creates coordinated adaptation:
Quiet conditions produce stronger filtering and wider bands.
Active conditions produce faster filtering and narrower bands.
The same innovation state therefore influences both the centre estimate and the trailing threshold.
Quiet Band Expansion
Quiet Band Expansion controls how much wider the Supertrend factor becomes when the innovation gate is closed.
A value of zero disables the expansion effect even if band adaptation is enabled.
Higher values:
Create wider bands during low-innovation conditions.
Reduce quiet-market reversals.
Delay new signals until price moves further.
Lower values:
Keep the adaptive factor closer to its base setting.
Allow more responsive regime changes.
The expansion is greatest when the gate is near zero and fades as the gate opens.
Supertrend trailing logic
The raw upper and lower bands are converted into one-sided trailing bands.
The lower band is prevented from moving downward while price remains above its previous value.
The upper band is prevented from moving upward while price remains below its previous value.
This ratcheting behaviour creates:
A rising lower trail during bullish conditions.
A falling upper trail during bearish conditions.
A trend change occurs when price crosses the active opposing boundary.
In a bullish regime:
The lower band is the active Supertrend.
In a bearish regime:
The upper band is the active Supertrend.
ATR Period and Factor
ATR Period
Controls the volatility horizon used to construct the Supertrend bands.
Lower values:
React faster to current range changes.
Produce more variable band widths.
Higher values:
Produce a steadier range estimate.
Respond more slowly to sudden volatility changes.
Factor
Controls the base distance between the filtered Hull and the Supertrend bands.
Lower factors:
Create tighter bands.
Produce earlier regime changes.
Increase sensitivity to noise.
Higher factors:
Create wider bands.
Produce fewer regime changes.
Increase confirmation delay.
When adaptation is enabled, the selected factor acts as the minimum or active-condition factor. Quiet conditions may expand it further.
Trend signals
The indicator generates a long signal when the Supertrend changes into its bullish state.
It generates a short signal when the Supertrend changes into its bearish state.
The signal requires the completed calculation chain:
Hull projection.
Innovation filtering.
Adaptive band factor.
Supertrend regime change.
The plotted symbols are:
𝕃 for a bullish transition.
𝕊 for a bearish transition.
These markers identify regime changes. They are not complete trading systems and do not define stop placement, position size or profit targets.
Innovation impulse alert
The script also includes an Innovation Impulse alert.
This occurs when the innovation score crosses above the selected Innovation Threshold.
It indicates that:
The difference between the Hull projection and the recursive estimate has become large relative to volatility.
The gate is entering a more active state.
The filter is beginning to admit new information more aggressively.
An innovation impulse does not necessarily produce an immediate Supertrend reversal.
It can occur:
During acceleration within an existing trend.
At the beginning of a possible regime change.
During a temporary volatility shock.
It is therefore best interpreted as an information-arrival event rather than an automatic long or short signal.
Visual components
Hull Projection
Displays the unfiltered Hull Moving Average input.
This is useful for comparing:
The responsive raw projection.
The innovation-filtered result.
The final Supertrend.
The Hull projection will generally react first.
Filtered Hull
Displays the recursive innovation-gated estimate.
The distance between the Hull projection and filtered Hull helps illustrate the filter’s current behaviour.
During quiet conditions:
The filtered Hull may lag behind small changes.
During meaningful innovations:
It can move more rapidly toward the Hull projection.
IGH Supertrend
Displays the final volatility trail around the filtered Hull.
It is the primary regime output.
The line is coloured according to the persistent bullish or bearish trend state.
Candle colouring
Candles may be coloured according to the active Supertrend regime:
Bullish colour during the long regime.
Bearish colour during the short regime.
This provides immediate chart-wide directional context.
How to interpret the indicator
Bullish regime
A bullish regime indicates that price has crossed into the bullish side of the adaptive Supertrend structure.
The active trail is positioned below the market and can be interpreted as:
A dynamic trend boundary.
A possible pullback reference.
A regime invalidation guide.
Bearish regime
A bearish regime indicates that price has crossed into the bearish side of the adaptive structure.
The active trail is positioned above the market and may act as:
Dynamic resistance.
A rally reference.
A bearish regime invalidation guide.
Low innovation score
A low score means the current Hull movement is small relative to volatility.
The model responds by:
Filtering more strongly.
Reducing admission.
Using a lower recursive gain.
Potentially expanding the Supertrend bands.
This is intended to reduce reactions to small fluctuations.
High innovation score
A high score means the Hull projection has changed substantially relative to volatility.
The model responds by:
Opening the gate.
Increasing admission.
Increasing process uncertainty.
Raising the filter gain.
Reducing quiet-condition band expansion.
This allows a faster response when the incoming information is more significant.
Rising Hull without a trend flip
The Hull projection may turn before the filtered Hull or Supertrend.
This means:
The fast input has changed.
The adaptive filter has not yet admitted enough of that change.
The Supertrend boundary has not yet been crossed.
This is not an error. It demonstrates the staged confirmation design.
Innovation impulse without trend reversal
An innovation impulse can occur without a long or short signal.
This may indicate:
Acceleration in the existing trend.
A volatility shock.
An attempted reversal that has not crossed the Supertrend.
The Supertrend remains the final regime layer.
How to use the indicator
1. Trend regime filter
Use the active Supertrend state to filter another entry method:
Prioritise long setups during bullish regimes.
Prioritise short setups during bearish regimes.
2. Pullback framework
In a bullish regime, pullbacks toward the Supertrend may represent tests of the active trend boundary.
In a bearish regime, rallies toward the Supertrend may represent resistance tests.
A touch alone does not guarantee continuation.
3. Innovation monitoring
The innovation alert can be used to identify when the model detects a meaningful change in its input.
This may help direct attention to:
Fresh acceleration.
Breakout attempts.
Possible trend transitions.
4. Confirmation framework
The three optional lines can be read as a progression:
Hull projection changes first.
Filtered Hull adapts according to innovation.
Supertrend confirms the final regime.
This allows users to study the difference between early movement and confirmed structure.
5. Trailing risk reference
The final Supertrend may be used as a visual trailing reference.
However, it does not account for:
Account size.
Position size.
Slippage.
Liquidity.
Maximum acceptable loss.
It should not replace a complete risk-management process.
Parameter interaction
The settings should not be tuned independently without considering how they interact.
More responsive configuration
A more responsive setup may use:
Lower Hull Length.
Lower Innovation Threshold.
Higher Admission Floor.
Lower Measurement Noise.
Higher Process Noise or Process Boost.
Lower Supertrend Factor.
Lower Quiet Band Expansion.
This will generally produce earlier changes but more noise.
More conservative configuration
A more conservative setup may use:
Higher Hull Length.
Higher Innovation Threshold.
Lower Admission Floor.
Higher Measurement Noise.
Lower Process Boost.
Higher Supertrend Factor.
Higher Quiet Band Expansion.
This will generally create fewer transitions but greater delay.
Balanced interpretation
Changing several settings in the same direction can produce an extreme result.
For example:
A very low threshold, high admission floor, large process boost and tight Supertrend factor may overreact.
A very high threshold, low admission floor, high measurement noise and wide Supertrend factor may respond excessively slowly.
The appropriate balance depends on the instrument, timeframe and intended holding period.
How this differs from a standard Hull trend indicator
A standard Hull trend indicator normally uses:
Hull slope.
Price crossing the Hull.
A fast and slow Hull comparison.
This indicator instead:
Uses the Hull as an observation.
Measures its disagreement with a recursive estimate.
Normalises that disagreement by volatility.
Adapts the filter gain according to the innovation.
Applies a final Supertrend regime around the filtered result.
The Hull is therefore the beginning of the model, not the final signal.
How this differs from a fixed Kalman-style filter
A fixed recursive filter uses constant uncertainty settings.
Innovation-Gated Hull Supertrend adapts both measurement and process uncertainty according to the normalised innovation.
This means:
Small innovations are filtered more heavily.
Large innovations receive greater admission.
The response speed is therefore state dependent.
How this differs from a standard Supertrend
A standard Supertrend is commonly centred around a raw price reference such as HL2.
This indicator uses:
A responsive Hull projection.
An innovation-gated recursive estimate of that projection.
An optionally adaptive band multiplier.
The Supertrend is therefore built around a filtered trend estimate rather than raw price alone.
Strengths
Combines responsive and stable trend-processing stages.
Normalises new movement by current volatility.
Uses a smooth gate rather than a binary threshold.
Adapts measurement and process uncertainty.
Can widen trend bands during quiet conditions.
Can respond more rapidly to meaningful innovations.
Separates early movement from final regime confirmation.
Supports ATR, standard deviation and blended volatility models.
Provides trend, impulse and visual comparison outputs.
Limitations
The indicator is reactive rather than predictive.
Strong filtering can delay genuine reversals.
Responsive settings can increase whipsaws.
A large innovation may represent a temporary shock rather than a lasting trend.
Supertrend signals still depend on ATR and price crossing behaviour.
Parameter combinations can materially change the model’s behaviour.
The indicator may require different settings across assets and timeframes.
The recursive state develops from the available chart history.
Values can update while the current real-time candle is still forming.
Causality and real-time behaviour
The calculation uses current and historical observations without future-looking references.
However, like most indicators calculated on live candles, the current bar’s values can change before the candle closes.
This means:
The Hull projection may move intrabar.
The innovation score and gate may change intrabar.
A Supertrend transition may appear and disappear before confirmation.
Users requiring confirmed signals should evaluate the indicator at bar close or configure alerts accordingly.
Alerts
The indicator provides three alert conditions:
IGH ST Long: the adaptive Supertrend changes into a bullish regime.
IGH ST Short: the adaptive Supertrend changes into a bearish regime.
IGH Impulse: the normalised innovation score crosses above the selected threshold.
The impulse alert identifies increased information flow into the filter. It does not specify direction by itself because the innovation score uses the absolute size of the prediction error.
Summary
Innovation-Gated Hull Supertrend combines a responsive Hull Moving Average, a volatility-normalised innovation gate, an adaptive recursive filter and a volatility-trailing Supertrend.
The Hull projection provides an early estimate of directional movement. The recursive filter compares that projection with its prior state and measures the resulting innovation relative to ATR, standard deviation or a blend of both.
A logistic gate then determines how strongly the new movement should be admitted. During quiet conditions, the filter becomes more conservative and the Supertrend bands can expand. During meaningful displacement, the filter becomes more responsive and the bands move closer to their base width.
The final Supertrend converts the adaptive estimate into a persistent bullish or bearish regime.
The indicator is designed to make responsiveness conditional rather than fixed: small movements receive stronger filtering, while larger volatility-adjusted innovations are allowed to influence the model more quickly.
インジケーター

CrosswindCROSSWIND
Crosswind is a signal and trade management indicator built on EMA crossovers, but the crossover itself is only the starting point. Most crossover systems break down in two predictable places. They enter on the cross, which is very often the worst price in the whole move, and they exit at a fixed percentage target, which caps the rare large trends that are supposed to pay for all the small losers. Crosswind addresses both problems and then reports every result net of trading costs, so you can judge whether an edge actually survives the fee schedule.
THREE TIMEFRAME PRESETS
Selecting a trading style sets the EMA pair for you. 15 Min Scalping uses 9 and 21. 1 Hour Swing uses 13 and 48. Daily Trend uses 15 and 150. The preset also sets the width of the trailing stop, since noise that is meaningless on a daily chart will repeatedly eject you from a position on a 15 minute chart.
TREND FILTER
A 200 period SMA gates direction. Long signals are only considered while price trades above it and short signals only while price trades below it. The chart background shades faint green above and faint red below so the active regime is visible at a glance.
TWO SIGNAL MODES
Crossover mode fires when the fast EMA crosses the slow EMA in the direction of the trend filter.
Pullback mode waits. After the fast EMA crosses above the slow EMA, no signal is issued yet. The indicator waits for price to retrace into the slow EMA and then close back across it, within a window of bars that you control. You are buying the first dip after trend confirmation rather than the extension itself. Fewer signals, but a materially better average entry, and your initial stop sits closer to structure.
OPTIONAL MACD CONFIRMATION
A standard MACD can be required to agree with the signal direction. It reduces frequency and filters some counter momentum entries.
HOW A TRADE IS MANAGED
Risk is measured in R, where 1R is the initial stop distance of 2x ATR. Every number the indicator reports is expressed in these units, which makes results comparable across symbols and volatility regimes.
A trade passes through three stages.
Initial stop. Placed 2x ATR from entry. Nothing moves while the trade is proving itself.
Breakeven. Once the trade reaches 1R in your favour, the stop advances to entry plus the full round trip cost plus a small cushion. This is a real breakeven, not a nominal one, so a trade stopped at this stage does not quietly book a small loss.
Trail. Once the trade reaches 1.5R, a chandelier trail arms. It tracks the highest high reached since entry, offset by an ATR multiple, and it only ever ratchets in your favour. The stop line turns blue when the trail is live, so the current stage is always obvious on the chart.
There is no fixed profit target by default. A winning trade runs until the trail takes it out. If you want a cap for comparison purposes you can set a hard target expressed in R.
An alternative EMA trail is included, which follows the slow EMA with an ATR buffer, for traders who prefer a moving average exit.
COST ACCOUNTING
Fees and slippage are charged per side against the actual entry and exit prices, so cost scales properly with price rather than being a flat assumption. Funding is optional and charged per eight hours held, scaled by your chart timeframe. Defaults assume 0.06 percent taker fees and 0.02 percent slippage. Lower the fee if you post maker orders.
This matters more than most traders expect. Cost per trade is roughly twice the round trip percentage divided by the stop distance. On a daily chart with a wide stop this rounds to almost nothing. On a 15 minute chart with a tight ATR it can exceed a tenth of an R on every single trade, which is enough to turn a system with a respectable win rate into a losing one.
READING THE LABEL
The status label reports the live trade state and the closed trade record. Net R and average R per trade are the headline numbers. Gross R and cost drag are shown alongside them deliberately. If cost drag is consuming a large fraction of gross R, the honest conclusion is that the configuration trades too frequently for the size of its edge, and the fix is a stricter entry filter rather than a cleverer exit.
Best and worst trade, win rate, and the outcome of the most recent trade are also shown. Trend following configurations typically produce a win rate below fifty percent while remaining profitable, because the winners are much larger than the losers. Judge the system on average R, not on win rate.
ALERTS
Five alert conditions are available. Long signal, short signal, either signal, stop or trail hit, and trail armed.
THE CONFIGURATION I USE
1 Hour Swing preset with signal mode set to Pullback, and the reversal option left off so that an opposite signal does not close and flip an open position. Trades finish on their own stop or trail, and the next signal is only taken once flat. This produces a lower trade count with cleaner entries and lets the trail do the work of deciding when a move is over.
LIMITATIONS WORTH KNOWING
Signals evaluate on bar close. Stop resolution uses the level carried in from the previous bar before the trail updates on the current bar, which avoids look ahead but means the trail lags by one bar. When a single bar's range covers both the stop and a hard target, the result is scored as a stop, because OHLC data cannot reveal which level was reached first. The statistics are a study of signal quality, not a full backtest, and they assume constant risk per trade with no position sizing or compounding.
This indicator is a tool for analysis and is not financial advice. Test any configuration on your own market and timeframe before risking capital. インジケーター

Colored ALMAALMA is the Arnaud Legoux Moving Average. Instead of weighting every bar in the lookback equally, it lays a bell curve over those bars and weights them by where they fall under that curve. The Offset decides where the peak of the curve sits. At 0.85 the peak sits near the newest bars, so the line hugs price with very little lag. Sigma controls how narrow the bell is, and a higher Sigma like 6 means fewer bars carry real weight, which smooths the line. So 14, 0.85, 6 gives you a fast line that still refuses to chase every tick.
How the color decides itself
In slope mode the script only asks one question each bar: is the ALMA higher or lower than it was on the previous bar. Rising paints green, falling paints red. The direction is stored in a variable that carries forward, so if the line goes perfectly flat for a bar it holds whatever color it had rather than blinking to something neutral. You only get a color change when the line genuinely turns.
That is why slope mode is quieter than price versus ALMA. Price can poke through a moving average a dozen times in a sideways hour, but the average itself has to actually roll over before slope changes.
The markers and the alerts
A small triangle prints under the bar when it turns green and above the bar when it turns red, so you can eyeball the history without hunting for the exact bar where the color switched.
For alerts you have four options in the dialog. Three of them are alertcondition entries: green only, red only, or any change. Those let you set your own trigger frequency in the alert window. The fourth is the built in alert call, which fires on bar close and sends a message with the direction and the price. Use the alertcondition ones if you want control over frequency, use the alert call if you want the message to carry the price with it.
To make slope the default
Change the first argument on the Color Rule input from "Price vs ALMA" to "ALMA Slope". Everything else stays as is.
One thing worth knowing before you lean on it: slope mode is calmer, but in tight chop a fast ALMA can still ripple up and down a few ticks and flip on you. If that shows up on your timeframe, raising Length or lowering Offset a little will kill most of it. This is a tool to give information about a price chart and is not financial advice. インジケーター

VWAP Suite | Trend & Mean Reversion with Adaptive FiltersOverview
This strategy is built around a custom volume-weighted average price (VWAP) engine with standard-deviation bands, and gives you two complete, independently-tuned trading modes in a single script:
Trend Following — trades breakouts/crossovers in the direction of VWAP's own momentum
Mean Reversion — trades stretched price extremes back toward VWAP, filtered for low-trend conditions
Rather than assuming one style of market behavior, this script lets you choose the mode that matches what you're trading — a trending momentum stock, or a calmer range-bound one — and includes a layered filter system designed to keep you out of low-quality setups in either mode.
How VWAP Is Calculated
VWAP weights price by the volume traded at that price, rather than treating all price ticks equally — so it reflects where the real trading activity concentrated, not just a simple average.
This script computes it manually (not via a black-box built-in), which allows for flexible anchoring:
Session — resets daily (best for lower timeframes, intraday charts)
Week — resets weekly (better for 1H–4H charts)
Month — resets monthly (for swing/position-style testing)
Standard deviation bands are plotted at three levels (1, 2, and 3 std dev by default), giving visual reference points for "normal," "stretched," and "extreme" price deviation from the volume-weighted average.
Strategy Modes
Trend Following
Looks for price to break through VWAP (or an outer band) in a direction confirmed by VWAP's own slope — the idea being that VWAP acting as support/resistance and trending in your trade's direction adds conviction to the move.
Three selectable entry triggers: VWAP Cross, Band 1 Break, Band 2 Break
VWAP slope filter (with adjustable lookback and minimum slope %) to avoid trading flat/directionless VWAP
Take-profit targets at the opposite band or at VWAP itself
Best suited for: momentum-driven, higher-volatility names where trends persist once established.
Mean Reversion
Looks for price to overextend beyond a chosen band, then trades the snap-back toward VWAP. Includes an ADX filter to specifically avoid taking reversion trades during strongly trending conditions (where "buying the dip" or "fading the rip" is historically much riskier).
Three selectable entry triggers: Outside Band, Band Cross, Band Reclaim (wick-and-recover confirmation — the most conservative/false-signal-resistant option)
ADX filter caps entries below a configurable trend-strength threshold
Maximum VWAP deviation cap (in ATR units) to avoid catching a falling knife on extreme extensions
Best suited for: range-bound, lower-volatility names where price oscillates predictably around a stable average.
Filter System (False-Signal Reduction)
Every entry — in either mode — passes through a shared base filter layer before mode-specific logic is applied:
Volume Filter: Requires volume above a multiple of its recent average, filtering out low-conviction moves
Volatility (ATR) Filter: Requires a minimum ATR (as % of price) to avoid dead, directionless conditions
Band Width Filter: Avoids trading when bands are unusually tight (a sign of indecision and high whipsaw risk)
VWAP Slope Filter (Trend mode): Confirms VWAP itself is moving meaningfully in the trade direction, not just flat
ADX Filter (Mean Reversion mode): Blocks entries when the broader trend is too strong to safely fade
Each filter can be toggled independently, so you can isolate which conditions matter most for the instrument and timeframe you're trading.
Optional Confluence Layer
A secondary indicator can be layered on top of either mode:
RSI — for trend mode, confirms momentum direction; for mean reversion, confirms oversold/overbought exhaustion via a crossover trigger
EMA Regime (200-period default) — acts as a higher-level trend filter, only allowing longs above the EMA and shorts below it
Risk Management
Risk-based position sizing — position size is calculated from your risk % input divided by stop distance, not a fixed share count
Maximum position size cap (% of equity) — acts as a hard ceiling so tight-stop trades can't produce oversized positions
Two stop-loss methods — ATR-multiple based, or band-based (using the outer bands as structural stop references)
Two take-profit methods — opposite band target, or VWAP itself
Optional fixed take-profit lock — freezes the target price at entry rather than letting it drift with VWAP
Optional break-even stop — moves the stop to entry once a configurable ATR-multiple of profit is reached
Visuals
VWAP line color-shifts between two colors depending on whether price is above or below it
Three-tier shaded band system for at-a-glance visual reference of price deviation
Entry markers (triangle up/down) plotted directly on signal bars
Background shading during filtered/no-trade conditions, so you can visually see why the strategy stayed flat
Important Notes Before Use
Match your anchor period to your timeframe. Session anchoring is built for intraday charts; on higher timeframes (2H+), Week or Month anchoring will produce more reliable slope readings, since Session resets can occur every few bars and distort trend measurement.
Backtest results include commission assumptions but not slippage — adjust the commission/slippage settings in the strategy properties to reflect your actual broker before drawing conclusions from performance metrics.
This script is provided for research and educational purposes. Past performance in backtesting does not guarantee future results. Always forward-test on a paper account before committing real capital. ストラテジー

Quant Regime Oscillator [JOAT]════════════════════════════════
QUANT REGIME OSCILLATOR
════════════════════════════════
A separate-pane composite oscillator that fuses two classic quant signals — how stretched price is from its own mean, and how strong its momentum is relative to recent volatility — into a single bounded line from -100 to +100 . A Kaufman Efficiency Ratio regime filter then decides whether the market is Trending , Mean-Reverting , or Random , so signals only fire when conditions actually support them.
▎ WHAT IT DOES
It condenses mean-deviation and normalized momentum into one clean, smoothed oscillator, classifies the current market regime, and prints sparing BUY / SELL labels only at stretched extremes that align with a trend. A dashboard summarizes every moving part at a glance.
▎ HOW IT WORKS
• Z-Score component — price is measured against its moving mean and standard deviation, then clamped at ±3σ and rescaled to ±100. This captures how far price has deviated from equilibrium.
• Momentum component — rate-of-change is normalized by its own standard deviation (volatility-adjusted), clamped at ±3σ and rescaled to ±100. This measures thrust independent of raw price size.
• Composite blend — the two components are combined using your chosen weights, EMA-smoothed, and clamped into a single -100..+100 oscillator , with an EMA signal line layered on top.
• Regime filter — a Kaufman Efficiency Ratio (directional change ÷ total path) scores 0..1. High values = trending; low values = mean-reverting; in-between = random. Direction is read from price versus its mean.
• Signal gate — a raw BUY needs the oscillator to cross up over its signal, to have recently visited oversold , and to sit inside a trending-up regime. SELL is the mirror. A cooldown enforces a minimum bar gap so labels stay few and never stack.
• Divergence — pivot highs/lows on the oscillator are compared to price pivots to flag regular bullish and bearish divergences.
▎ HOW TO USE IT
• Read the oscillator like a bounded momentum gauge — blue above zero, magenta below. Pushes into the dotted ±80 extreme bands mark exhaustion zones.
• BUY pills appear at oversold turns inside up-trends; SELL pills at overbought turns inside down-trends. Treat them as context-filtered setups, not standalone triggers.
• Use the regime as your playbook: in Trending , favor pullback continuation; in Mean-Rev , fade the band extremes; in Random , stand aside or size down.
• The subtle pane background tint mirrors the regime — blue for trending-up, magenta for trending-down, grey for mean-reverting.
• Divergence dots on the oscillator hint at weakening thrust; combine with your own structure and risk levels.
▎ KEY SETTINGS
• Engine — Z-Score length, Momentum (ROC) length, per-component weights, oscillator smoothing, and signal-line length.
• Regime — Efficiency Ratio window plus the Trending and Mean-Revert thresholds that split the three regimes.
• Signals — Overbought / Oversold levels, OB/OS recall window, minimum bars between signals (cooldown), and divergence pivot length.
• Visuals — toggle the gradient fill, oscillator line, signal line, regime background, and signal markers.
• Dashboard — show/hide, position, and text size.
▎ DASHBOARD
A compact blue/magenta panel reporting: the current bias (Long / Short / Flat), the composite score, raw Z-Score in σ, the momentum value, the active regime with a strength percentage, the OB/OS state , any live divergence , and the current signal status.
▎ ALERTS
• QRO — Long — oscillator crossed up from oversold in a trending-up regime.
• QRO — Short — oscillator crossed down from overbought in a trending-down regime.
• QRO — Any Signal — fires on either a long or short signal.
▎ NOTES
• Works on all timeframes and all assets — the oscillator is self-normalizing, so it adapts to the instrument automatically.
• Every visual layer is toggleable for a clean chart; the cooldown keeps markers sparse on any timeframe.
• Signals confirm on the closed bar and are non-repainting once the bar completes; divergence markers reference confirmed pivots offset back by the pivot length.
For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results. Always do your own analysis and manage your own risk.
Made with passion by JackOfAllTrades ⚡
インジケーター

Watchlist Curator Stock RankerPick a sector — it scores ten of that sector's biggest names and ranks the top five leaders. A fast, honest starting point for your watchlist.
You've spotted the strong sector. Now — which stocks? Watchlist Curator takes one sector, scores ten of its biggest, most-traded names against the same yardstick, and hands you the top five in ranked order. That's a working watchlist in one look, instead of an hour of chart-flipping.
It works on its own — nothing else required.
Why a composite rank instead of raw relative strength?
Sorting a basket by relative strength alone hands you whatever ran the hardest — which is often the name that's most stretched and least enterable. The Curator's score starts with RS but lets the other components confirm or veto it: the trend stack rewards names in clean uptrends, the RSI sweet-spot deliberately down-ranks anything already overbought, and volume confirms real participation. The point of combining them is to surface leaders you can still enter — a different question than "what went up the most."
What it ranks — clearly said
Each of the 11 sectors carries a fixed basket of ten household-name bellwethers (Technology = AAPL, MSFT, NVDA, AVGO, CRM, AMD, ADBE, ORCL, CSCO, ACN — and so on for the rest). The Curator ranks *within that basket*. It doesn't scan every stock in the sector — it tells you which of the sector's big liquid names lead, which is where most swing traders should be looking anyway.
The Leadership Score (hover the Score header for this on the chart)
Relative strength vs SPY — the stock's % move minus SPY's over the lookback (20 bars by default). The backbone of the score.
Trend stack — up to +6: above the fast EMA, fast EMA above slow, above the slow EMA (+2 each).
RSI sweet spot — +3 only when RSI sits between 50 and 70: trending, but not overbought. This is deliberate — a red-hot name that's already stretched ranks lower on purpose, so the list points you at leaders you can still enter, not chases.
Volume — +2 for trading above its average.
The score is relative-strength % plus points — not a 0–100 scale. The Rating column translates it: 15+ Strong · 5–15 Good · 0–5 Fair · below 0 Lagging the market. The #1 row is highlighted in gold; a name whose data can't load shows "n/a".
How to use it
1. Find the leading sector — use whatever sector-strength read you trust.
2. Pick that sector in the dropdown.
3. Read the top five. Gold row = the current leader.
4. Those names are the charts worth your study time.
Settings — defaults work out of the box
Sector (dropdown, 11 choices) and timeframe (Daily by default — the ranking uses this timeframe no matter what chart you're on).
RS/momentum lookback (20), fast/slow EMA (20/50), RSI length (14).
Stocks to show (up to 5), table position, text size, dark/light theme, colors.
⚠ Educational tool for building a focused watchlist. It ranks relative strength — it does not give buy/sell signals or predict price. Not financial advice. インジケーター

Buy-Sell Signals using Multi-Logic Trading System
📈 Advanced Multi-Logic Trading System with Trend, Momentum, Breakout and Risk Management
The **Buy-Sell Signals using Multi-Logic Trend, Momentum & Breakout System** is a multi-condition trading indicator designed to help traders identify structured trading opportunities across different market environments.
Unlike a conventional indicator that depends on only one moving-average crossover or oscillator, Buy-sell with Multi-logic Trading Sytem combines:
✅ Market structure and EMA alignment
✅ Higher-timeframe trend confirmation
✅ Session VWAP positioning
✅ RSI and MACD momentum
✅ Bollinger Band positioning and volatility
✅ Volume expansion and OBV direction
✅ Range-breakout confirmation
✅ Sideways-market mean reversion
✅ Dynamic stop-loss and target calculations
✅ Signal management and cooldown controls
The objective is not to produce the maximum number of signals.
The objective is to filter market noise and highlight situations where multiple independent conditions support the same directional view.
━━━━━━━━━━━━━━━━━━━━
🧠 How the Indicator Reads the Market
Buy-sell with Multi-logic Trading Sytem continuously classifies the chart into one of four market conditions:
📈 BULLISH TREND
A bullish trend is identified when:
**Price > Fast EMA > Medium EMA > Slow EMA**
With the default settings, this represents:
**Price > EMA 20 > EMA 50 > EMA 200**
This structure indicates that short-term, medium-term and long-term price positioning is aligned in the bullish direction.
------------------------------------------------
📈 BEARISH TREND
A bearish trend is identified when:
**Price < Fast EMA < Medium EMA < Slow EMA**
With the default settings:
**Price < EMA 20 < EMA 50 < EMA 200**
This indicates complete bearish alignment across the three trend layers.
------------------------------------------------
📈 RANGE / SIDEWAYS
The system studies the previous trading range over the selected Range Lookback.
The current candle is excluded from this range calculation. This allows the indicator to identify a genuine close outside the previous range instead of comparing the breakout candle against a range that already includes it.
A market is treated as sideways when:
• The previous range width remains within the selected percentage threshold
• Complete bullish EMA alignment is absent
• Complete bearish EMA alignment is absent
------------------------------------------------
📈 Transition
The Transition condition appears when the market is neither properly trending nor qualifying as a defined range.
This commonly happens when:
• EMAs are crossing or compressing
• Price repeatedly moves around the EMA ribbon
• The previous trend is weakening
• A new trend has not yet become established
• Price is moving between range and trend conditions
Transition is usually the least reliable environment for mechanical signals.
━━━━━━━━━━━━━━━━━━━━
⚙️ The Four Entry Logic Engines
Buy-sell with Multi-logic Trading System contains four separate entry engines.
Each engine is designed for a different type of market behaviour.
📈 1. Trend-Following Logic
Trend-following logic is designed to participate in an already established directional move.
A bullish trend setup requires:
• Bullish EMA alignment
• Minimum bullish confluence score
• Higher-timeframe bullish permission
• Price above session VWAP
A bearish trend setup requires the opposite conditions.
🔷 Bullish confluence score
The bullish score contains six independent components:
1. Bullish EMA trend alignment
2. RSI positioned between 45 and 72
3. MACD above its signal line with a positive histogram
4. Price above the Bollinger Band basis
5. High volume with bullish OBV behaviour
6. A bullish candle closing above the previous structural swing high
🔷 Bearish confluence score
The bearish score also contains six components:
1. Bearish EMA trend alignment
2. RSI positioned between 28 and 55
3. MACD below its signal line with a negative histogram
4. Price below the Bollinger Band basis
5. High volume with bearish OBV behaviour
6. A bearish candle closing below the previous structural swing low
The **Minimum Trend Confluence** setting determines how many of these six conditions must agree.
🔷 When to use Trend-Following Logic
👉Use it when:
• The EMA ribbon is properly expanded
• Price is making higher highs and higher lows in an uptrend
• Price is making lower highs and lower lows in a downtrend
• Pullbacks are respecting the fast or medium EMA
• Price is consistently holding on the correct side of VWAP
• The higher-timeframe trend supports the trade direction
👉 When to avoid it
Avoid relying on trend logic when:
• EMAs are flat or repeatedly crossing
• Price is trapped inside a narrow range
• The market-condition card shows Transition
• A signal appears directly below major resistance
• A signal appears directly above major support
• Price has already completed a large impulsive move without a pullback
━━━━━━━━━━━━━━━━━━━━
📈 2. Momentum Logic
Momentum logic is designed to detect acceleration before complete trend confluence becomes necessary.
🔷For bullish momentum, the indicator looks for:
• Price above the fast EMA
• RSI above 52
• Positive MACD histogram
• MACD histogram increasing from the previous candle
• Bullish OBV positioning
• Volume confirmation when usable volume is available
• Bullish higher-timeframe permission
• Price above VWAP
🔷Bearish momentum uses the opposite conditions.
Momentum logic can respond earlier than full trend logic because it does not require the complete EMA 20–50–200 alignment or the minimum six-part trend score.
👉 When to use Momentum Logic
Momentum logic is most useful when:
• Price is emerging from consolidation
• A fresh intraday directional move is developing
• Volume is expanding with price
• MACD momentum is accelerating
• Price has reclaimed or rejected VWAP decisively
• A pullback is followed by renewed directional strength
• The higher timeframe already supports the intended direction
👉 When to avoid it
Avoid momentum entries when:
• The momentum candle is unusually extended
• Price is entering a major higher-timeframe supply or demand zone
• Volume expansion is caused by a news spike
• MACD is positive but price structure remains weak
• Price repeatedly crosses VWAP
• The chart has unreliable or unavailable volume data
Momentum logic is especially dependent on meaningful volume and OBV behaviour. It is therefore generally better suited to liquid stocks, indices, futures and other actively traded instruments.
━━━━━━━━━━━━━━━━━━━━
📈 3. Range-Breakout Logic
The breakout engine is designed to identify confirmed movement outside a previously established range.
It does not trigger merely because price trades a few ticks outside the range.
A bullish breakout requires:
• The previous market qualified as a range
• Price closes above the previous range high
• The close exceeds the range by the selected ATR buffer
• The previous candle had not already closed above the range
• The breakout candle closes strongly toward its high
• RSI is above 50
• MACD is bullish
• Volume confirms the move when available and required
• Price is above VWAP
The bearish breakout logic uses the opposite conditions.
🔷 Breakout Confirmation Buffer
The ATR buffer prevents the system from treating a marginal move above or below the boundary as a valid breakout.
A value of **0.15 ATR** means price must close beyond the range boundary by an additional 15% of the current ATR.
Increasing this value creates fewer but more selective breakout signals.
🔷 Breakout Candle Close Position
The candle must also close strongly in the breakout direction.
With a value of **0.60**:
• A bullish breakout candle must close in the upper 40% of its total range
• A bearish breakout candle must close in the lower 40% of its total range
This helps reject candles that break a level intrabar but leave a large rejection wick.
🔷 Important HTF behaviour
The higher-timeframe EMA filter directly controls the Trend and Momentum engines.
The Range-Breakout engine instead uses its own range, ATR, candle-strength, RSI, MACD, volume and VWAP confirmation.
Therefore, traders should still manually inspect the higher-timeframe structure before accepting a breakout signal.
👉 When to use Breakout Logic
Use breakout logic when:
• Price has formed a clean and visible range
• Range boundaries have been tested multiple times
• Bollinger Band width has contracted before expansion
• Volume increases during the breakout
• The breakout candle closes outside the level
• There is sufficient room before the next major structure
• VWAP supports the breakout direction
👉 When to avoid it
Avoid breakout entries when:
• The range is poorly defined
• Price is breaking directly into higher-timeframe resistance or support
• The breakout candle leaves a large rejection wick
• Volume is weak or declining
• Price has already moved far beyond the range before entry
• The breakout occurs during an irregular news candle
• The range threshold is set too loosely and ordinary price movement is being classified as consolidation
━━━━━━━━━━━━━━━━━━━━
📈 4. Sideways Mean-Reversion Logic
Mean reversion is disabled by default because it represents a different trading philosophy from trend-following.
Instead of expecting price to continue moving away from fair value, this engine looks for rejection near the outer areas of a sideways range.
The range is divided into zones:
• Lower reversion area near the bottom 20% of the range
• Upper reversion area near the top 20% of the range
A bullish mean-reversion setup requires:
• Mean-reversion logic enabled
• Market classified as sideways
• Range sufficiently wide relative to ATR
• Price testing the lower reversion zone
• Price closing back above that zone
• A bullish rejection candle
• A sufficiently large lower wick
• RSI below 38
• RSI turning upward when the RSI-turn filter is enabled
• Volume permission
A bearish mean-reversion setup requires the opposite conditions near the upper range zone, with RSI above 62 and turning downward.
🔷 Important Mean-Reversion Behaviour
Mean-reversion trades are intentionally based on sideways-market rejection.
They do not use the higher-timeframe trend or VWAP filter in the same way as the Trend and Momentum engines.
This is logical because a range-fading trade may temporarily move against the prevailing higher-timeframe direction.
However, it also means mean-reversion mode should be activated only when the trader has independently confirmed that the market is genuinely balanced and range-bound.
👉 When to use Mean Reversion
Use it when:
• The market has clear horizontal boundaries
• EMA alignment is absent
• Price repeatedly rejects both sides of the range
• The range is wide enough to offer practical reward
• RSI reaches an extreme and begins turning
• The rejection candle closes back inside the range
• No major breakout catalyst is expected
👉 When not to use it
Disable mean reversion when:
• The market is strongly trending
• The EMA ribbon is expanding
• Price is forming one-sided momentum candles
• Volume is increasing near the range boundary
• A breakout is supported by broader-market direction
• Price is repeatedly pressing one boundary without meaningful rejection
Repeated testing of one range boundary can represent pressure accumulation rather than a reversal opportunity.
━━━━━━━━━━━━━━━━━━━━
🔍 Higher-Timeframe Trend Filter
The higher-timeframe filter compares price with an EMA calculated on the selected higher timeframe.
👉When enabled:
• Long Trend and Momentum setups require bullish HTF positioning
• Short Trend and Momentum setups require bearish HTF positioning
The higher-timeframe calculation is designed to use confirmed information rather than future-looking data.
🔷 Suggested timeframe combinations
These are practical starting points and should be tested for each instrument:
• 3-minute chart → 15-minute or 30-minute HTF
• 5-minute chart → 30-minute or 60-minute HTF
• 15-minute chart → 60-minute or 4-hour HTF
• 30-minute chart → 4-hour HTF
• 1-hour chart → 4-hour or Daily HTF
• 4-hour chart → Daily or Weekly HTF
A closer HTF produces more opportunities.
A larger HTF produces fewer but more structurally selective opportunities.
━━━━━━━━━━━━━━━━━━━━
📍 Session VWAP Filter
VWAP acts as the indicator’s intraday fair-value reference.
👉When enabled:
• Long Trend, Momentum and Breakout setups require price above VWAP
• Short Trend, Momentum and Breakout setups require price below VWAP
This reduces situations where a bullish technical setup appears below intraday fair value or a bearish setup appears above it.
👉Keep VWAP enabled when:
• Trading intraday
• Trading indices or liquid stocks
• Trading momentum continuation
• Trading opening-range or consolidation breakouts
• Filtering counter-directional entries
👉 Consider disabling VWAP when:
• Trading higher timeframes where session VWAP has less relevance
• Trading instruments with irregular sessions
• Testing a pure swing-trading model
• Using another manually defined fair-value framework
Disabling VWAP increases flexibility but may also increase counter-directional signals.
━━━━━━━━━━━━━━━━━━━━
📊 Volume and OBV Confirmation
The indicator compares current volume with its moving average.
With the default multiplier of **1.5**, high volume means the current volume is at least 1.5 times the selected average volume.
OBV is then compared with its own moving average to determine whether cumulative volume behaviour supports buyers or sellers.
The system is designed so that missing volume does not automatically block every setup.
However, symbols with reliable exchange volume are preferred, particularly when using Momentum Logic.
🔷 Volume Multiplier Interpretation
• 1.20–1.40: More responsive, but more noise
• 1.50: Balanced default
• 1.70–2.00: Strong expansion required
• Above 2.00: Very selective and mainly suited to exceptional participation
━━━━━━━━━━━━━━━━━━━━
🛡️ Stop-Loss and Target Engine
Every confirmed signal creates an active entry, stop-loss and target.
The indicator provides three stop-loss methods.
🔷 Structure + ATR
👉For a long trade:
The stop is placed below the previous structural swing low with an additional ATR buffer.
👉For a short trade:
The stop is placed above the previous structural swing high with an ATR buffer.
This is generally the preferred method for price-action and structure-based trading.
🔷ATR Stop
The stop is calculated using a fixed ATR multiple from the entry.
This method adapts to current volatility without depending on the location of a previous swing.
It can be useful for:
• Momentum setups
• Instruments with irregular swing structures
• Fast-moving markets
• Systematic risk standardisation
🔷 Fixed Percentage Stop
The stop is placed at a fixed percentage from entry.
This is simple but does not adjust to changing volatility.
It should be used carefully because the same percentage may be too tight in a volatile market and unnecessarily wide in a quiet market.
━━━━━━━━━━━━━━━━━━━━
📈 Target Methods
🔷Risk-to-Reward Target
The target is calculated from the actual distance between entry and stop.
With a 1.5 risk-to-reward ratio, the target is 1.5 times the defined trade risk.
🔷 ATR Target
The target is positioned at a selected ATR multiple from entry.
This can be useful for momentum trades where price expansion is expected.
🔷 Fixed Percentage Target
The target is placed at a fixed percentage from entry.
This is straightforward but less adaptive than ATR or structure-based calculations.
━━━━━━━━━━━━━━━━━━━━
🎯 Preferred Risk Settings
🔷 Structure-Based Intraday Trading
• Stop Method: Structure + ATR
• Structure ATR Buffer: 0.15–0.25
• Target Method: Risk:Reward
• Risk:Reward: 1.5–2.0
🔷 Momentum Trading
• Stop Method: ATR
• Stop ATR Multiplier: 1.2–1.8
• Target Method: ATR or Risk:Reward
• Target ATR Multiplier: 2.0–3.0
🔷 Swing Trading
• Stop Method: Structure + ATR
• Swing Lookback: 10–20
• Structure ATR Buffer: 0.20–0.40
• Target Method: Risk:Reward
• Risk:Reward: 1.5–2.5
🔷 Mean-Reversion Trading
• Stop Method: Structure + ATR or ATR
• Use a stop beyond the rejected range boundary
• Avoid excessively wide targets
• Consider the opposite side or midpoint of the range as practical structure
These values are starting points, not universal settings. Different instruments have different volatility and structural characteristics.
━━━━━━━━━━━━━━━━━━━━
🚦 Signal-Control System
Buy-sell with Multi-logic Trading System includes several controls to prevent repeated or conflicting signals.
👉 Minimum Bars Between Signals
The cooldown prevents the indicator from producing another signal immediately after the previous one.
Default: **5 bars**
Lower values create more frequent signals.
Higher values reduce repeated entries during the same move.
👉 Fresh Setup Only
When enabled, a signal appears only when the complete setup changes from false to true.
It prevents the indicator from repeatedly signalling on every candle while the same condition remains active.
This should normally remain enabled.
👉 Wait for SL or Target Before Next Signal
When enabled, the indicator waits for the active stop or target to be touched before accepting another trade.
This creates a cleaner one-trade-at-a-time workflow.
It is the preferred setting for discretionary traders and alert-based execution.
👉 Allow Opposite Signal
This setting becomes relevant when “Wait for SL/Target” is disabled.
It determines whether an opposite signal can replace the current directional trade before the original levels are completed.
━━━━━━━━━━━━━━━━━━━━
✨ Visual Features
3D Gradient Trend Ribbon
Glow Buy and Sell Markers
Signals are generated after the chart candle is confirmed.
Entry Beam
3D Risk and Reward Zones
VWAP Glow Line
Gradient Candle Coloring
━━━━━━━━━━━━━━━━━━━━
📋 Dashboard Explained
The dashboard provides a summary of current chart conditions.
Market Condition
Bull Score and Bear Score
RSI
ATR Percentage
Volume Ratio
Bollinger Band Width
HTF Trend
VWAP
Active Trade
SL / TP
Win Rate
The dashboard win rate is an internal chart-touch statistic based on whether displayed targets or stops were reached.
For reliable validation, traders should independently review historical trades and conduct proper testing.
━━━━━━━━━━━━━━━━━━━━
🔔 Alert Features
Buy-sell with Multi-logic Trading System provides alert conditions for:
• Confirmed BUY signal
• Confirmed SELL signal
• Active stop-loss touched
• Active target touched
Dynamic BUY and SELL alerts can also include:
• Symbol
• Entry price
• Stop-loss
• Target price
Signals and dynamic alerts are generated once per confirmed candle close.
For TradingView alerts, select the indicator and choose the required alert condition.
━━━━━━━━━━━━━━━━━━━━
📌 Preferred Logic According to Market View
👉 Strong Bullish Market
Recommended:
• Trend Logic: ON
• Momentum Logic: ON
• Breakout Logic: Optional
• Mean Reversion: OFF
• HTF Filter: ON
• VWAP Filter: ON
• Minimum Confluence: 4 or 5
Focus mainly on long signals, pullbacks and bullish consolidation breakouts.
👉Strong Bearish Market
Recommended:
• Trend Logic: ON
• Momentum Logic: ON
• Breakout Logic: Optional
• Mean Reversion: OFF
• HTF Filter: ON
• VWAP Filter: ON
• Minimum Confluence: 4 or 5
Focus mainly on short signals, failed recoveries and bearish range breakdowns.
👉 Developing Trend
Recommended:
• Trend Logic: ON
• Momentum Logic: ON
• Breakout Logic: ON
• Mean Reversion: OFF
• Minimum Confluence: 4
• Breakout Buffer: 0.10–0.20 ATR
Momentum or breakout logic may identify the move before complete EMA alignment develops.
👉 Established Trend
Recommended:
• Trend Logic: ON
• Momentum Logic: Optional
• Breakout Logic: Optional
• Mean Reversion: OFF
• Minimum Confluence: 4–5
• Structure + ATR stop
Look for continuation after controlled pullbacks rather than chasing extended candles.
👉 Clean Sideways Range
Recommended:
• Trend Logic: OFF or used cautiously
• Momentum Logic: OFF
• Breakout Logic: ON
• Mean Reversion: ON only for confirmed range rejection
• RSI Turn Requirement: ON
• Reversion Wick Ratio: 0.35–0.50
Use either range fading or breakout trading according to price behaviour—but avoid treating both as equally valid at the same moment.
👉 Transition or Choppy Market
Recommended:
• Increase Minimum Confluence
• Increase cooldown bars
• Use HTF and VWAP filters
• Keep Mean Reversion OFF unless a clear range forms
• Wait for structure to become clearer
Sometimes the best setting in a Transition market is simply to avoid trading.
━━━━━━━━━━━━━━━━━━━━
🧩 Suggested Presets
🔶 Balanced Intraday — 5 or 15 Minutes
• EMA: 20 / 50 / 200
• HTF: 60 minutes
• HTF Filter: ON
• VWAP Filter: ON
• Trend Logic: ON
• Momentum Logic: ON
• Breakout Logic: ON
• Mean Reversion: OFF
• Minimum Confluence: 4
• Volume Multiplier: 1.5
• Breakout Buffer: 0.15 ATR
• Breakout Close Position: 0.60
• Stop: Structure + ATR
• Target: 1.5 Risk:Reward
• Cooldown: 5 bars
• Fresh Setup Only: ON
• Wait for Exit: ON
🔶 Precision Intraday
• HTF Filter: ON
• VWAP Filter: ON
• Minimum Confluence: 5
• Volume Multiplier: 1.7–2.0
• Breakout Buffer: 0.20–0.30 ATR
• Breakout Close Position: 0.70–0.80
• Fresh Setup Only: ON
• Wait for Exit: ON
This preset produces fewer signals but demands stronger confirmation.
🔶 Fast Momentum Trading
• Trend Logic: Optional
• Momentum Logic: ON
• Breakout Logic: ON
• Mean Reversion: OFF
• HTF Filter: ON
• VWAP Filter: ON
• Volume Multiplier: 1.3–1.5
• Cooldown: 2–4 bars
• Stop: ATR
• Target: ATR or Risk:Reward
Fast settings should only be used on liquid instruments because they are more sensitive to lower-timeframe noise.
🔶 Range-Breakout Trading
• Trend Logic: Optional
• Momentum Logic: Optional
• Breakout Logic: ON
• Mean Reversion: OFF
• Breakout Buffer: 0.15–0.30 ATR
• Close Position: 0.65–0.80
• Require Breakout Volume: ON
• Volume Multiplier: 1.5–2.0
• VWAP Filter: ON
Manually confirm that sufficient space exists beyond the range.
🔶 Sideways Mean Reversion
• Trend Logic: OFF
• Momentum Logic: OFF
• Breakout Logic: Optional
• Mean Reversion: ON
• Minimum Range Width: 1.0–1.5 ATR
• Rejection Wick Ratio: 0.35–0.50
• RSI Turn Requirement: ON
• Fresh Setup Only: ON
• Wait for Exit: ON
Do not use this preset when the range boundary is being attacked with expanding volume.
🔶 Swing Trading — 1 Hour or 4 Hours
• EMA: 20 / 50 / 200
• HTF: 4 Hour, Daily or Weekly
• HTF Filter: ON
• VWAP Filter: Optional
• Trend Logic: ON
• Momentum Logic: ON
• Breakout Logic: ON
• Mean Reversion: Usually OFF
• Minimum Confluence: 4–5
• Swing Lookback: 10–20
• Stop: Structure + ATR
• Target: Risk:Reward
• Risk:Reward: 1.5–2.5
• Cooldown: 3–5 bars
━━━━━━━━━━━━━━━━━━━━
⛔ When Not to Use the Indicator
Avoid taking signals mechanically when:
• The market-condition card shows an unstable Transition phase
• Price is moving inside a very narrow and noisy area
• A signal is directly facing major higher-timeframe structure
• Price is highly extended from the EMA ribbon or VWAP
• The signal candle is abnormally large
• A major economic event is creating unpredictable volatility
• The selected instrument is illiquid
• Volume data is unreliable
• Bid–ask spreads are unusually wide
• The chart timeframe is too low for the instrument
• There is insufficient reward before the next support or resistance
• The stop required by structure is larger than the trader’s permitted risk
A technically valid signal is not automatically a good trade.
Location, liquidity, market context and risk remain essential.
━━━━━━━━━━━━━━━━━━━━
✅ Recommended Trading Workflow
Step 1 : Identify the market condition
Determine whether the chart is trending, ranging or transitioning.
Step 2 : Check the higher timeframe
Confirm the broader directional structure before using Trend or Momentum signals.
Step 3 : Check VWAP location
For intraday trading, prefer longs above VWAP and shorts below VWAP.
Step 4 : Read the dashboard
Compare:
• Bull and Bear scores
• RSI
• ATR percentage
• Volume ratio
• Bollinger Band width
• Higher-timeframe trend
Step 5 : Identify which logic suits the market
Do not use mean reversion in a strong trend.
Do not depend only on trend logic in an unstructured range.
Step 6 : Check trade location
Identify nearby support, resistance, previous-day levels, liquidity zones and higher-timeframe structure.
Step 7 : Evaluate risk
Check whether the displayed stop is logically placed and whether sufficient reward is available.
Step 8 : Wait for candle confirmation
Avoid anticipating a signal before the candle closes.
━━━━━━━━━━━━━━━━━━━━
⚠️ Important Notes
Buy-sell with Multi-logic Trading System is a decision-support indicator, not an automatic guarantee of profitable trades.
The indicator does not know:
• Your account size
• Your maximum permitted risk
• Whether a market-moving announcement is approaching
• Whether a nearby level is personally significant to your analysis
• Whether an option contract has suitable liquidity, delta or implied volatility
• Whether the displayed trade fits your trading plan
When several logic engines are enabled together, a BUY or SELL signal can originate from Trend, Momentum, Breakout or Mean-Reversion conditions.
The current signal marker does not separately label which internal engine generated it. The market condition, dashboard and surrounding price action should therefore be used to interpret the setup.
Always test the indicator on the intended market and timeframe before using it in live trading.
━━━━━━━━━━━━━━━━━━━━
📈 Final Perspective
Buy-sell with Multi-logic Trading System is designed around one central idea:
**Trade according to the current market regime instead of forcing the same strategy into every market.**
Use Trend Logic when structure is aligned.
Use Momentum Logic when participation and acceleration are increasing.
Use Breakout Logic when price is escaping a well-defined range with confirmation.
Use Mean Reversion only when the market is genuinely balanced and rejecting its boundaries.
The indicator can organise information, filter conditions and define structured risk—but disciplined execution, position sizing and market awareness remain the trader’s responsibility.
------------------------------------------------
**Educational use only. This indicator does not provide financial advice or guarantee future results.**
インジケーター

EMA Momentum & Cross EngineIndicator Summary: EMA Momentum & Cross Engine
This indicator is an advanced, fully customizable trend and momentum tool built around the 20 and 50 Exponential Moving Averages (EMAs). Instead of solely relying on traditional, lagging crossover signals, it proactively identifies high-probability reversals by mathematically measuring the tension between the moving averages.
Core Features:
Early Reversal Detection (DIV Signals): It measures the distance between the 20 and 50 EMA. When this distance becomes severely overextended (exhaustion) and suddenly snaps back with high velocity, it fires early "BUY DIV" or "SELL DIV" signals before a crossover ever happens.
Standard Crossovers: Plots standard trend-following buy and sell signals when the EMAs actually cross.
Smart Filtering Engine: Includes a built-in cooldown timer and max-signal limiters. This prevents rapid-fire false signals during choppy, sideways markets and keeps the chart perfectly clean.
Deep Customization: Every visual element is customizable. You can change the text, colors, label sizes, and even the precise mathematical distance the labels sit away from the candle wicks. It also features floating, dynamic labels at the end of the EMA lines so you never lose track of them.
Why ATR-Normalized Divergence is Better Than Slope
When trying to catch early trend changes or pullbacks, measuring the Average True Range (ATR) normalized spread between the EMAs is vastly superior to just measuring the slope of the lines. Here is why:
1. It Eliminates the "Visual Illusion"
The slope (angle) of a moving average on your screen is an illusion. If you zoom out or stretch the y-axis of your chart, a "flat" slope suddenly looks incredibly steep. Measuring the ATR spread relies on hard, objective math—not how your monitor happens to be scaled at that exact second.
2. It Automatically Adapts to Market Volatility
A 10-point distance between the 20 and 50 EMA means something completely different depending on the market environment.
If market volatility is dead, a 10-point gap is a massive, overextended move.
If the market is wildly volatile (like during a major news event), a 10-point gap is just normal background noise.
By dividing the EMA distance by the ATR, the indicator standardizes the measurement. A value of 1.0 means the EMAs are stretched exactly 1x the normal volatility of the current market, ensuring your signals are accurate regardless of whether the market is slow or fast.
3. It Measures the "Rubber Band" Tension
Slope only tells you the direction the market is heading. ATR Divergence tells you the tension. Markets act like rubber bands—they can only stretch so far from their mean (the 50 EMA) before they snap back. By tracking the exact moment that ATR-normalized rubber band is stretched to its limit and begins to shrink (the velocity delta), you get a high-probability entry for a mean-reversion trade or a deep pullback. インジケーター

ATK/DEF High Low & MA EngineATK/DEF High Low & MA Engine is a market structure analysis framework designed to evalu histor high and low price behavior together with moving average structure, momentum conditio, and volume environment.
Unlike traditional high and low markers that only display previous turning points, this indicator focuses on analyzing the quality and context of price extr by combining swing point identification with broade market conditions.
The purpose of this engine is to provide a structured view of how histo highs and lows develo, how pric interacts with different market phases, and how trend structure changes around important pric areas.
High & Low Structure Analysis
The indicator identifies swing highs and swing lows using pivot-based market structure detection.
Rather than treati eve high or low as equally signific, the framework is designed to highlight the relationship between:
Historical price turning points
Market direction
Trend organization
Pric momentum conditions
Trad activity environment
Swing points represent areas where pric previously experienced a structural reaction. These points can be used as references for stud market behavior and price development.
ATK / DEF Market Structure Concept
The indicator uses the concept of:
ATK (Attack Structure)
and
DEF (Defense Structure)
to describe different pric behaviors around market movement.
ATK focuses on directional strength and pric expansion characteristics.
DEF focuses on pric holding behavior, reaction areas, and structural balance.
This framework does not classify market movement as a guaran future outcome. Instead, it provides a visual representation of current market structure conditions based on histor price information.
Moving Average Structure Engine
The indicator integrates three moving averages to evalu market organization across different periods.
The MA framework analyzes:
Short-term price movement
Medium-term structure
Longer-term market direction
The relationship between multiple moving averages helps display:
Trend alignment
Directional consistency
Transition phases
Mixed market conditions
Instead of relying on a single moving average, the engine observes the interaction between different periods to provide a broader view of market structure.
Momentum & Market Condition Evaluati
The engine includes momentum observation by comparing recent pric movement with previous pric levels.
This component evaluates:
Pric expansion strength
Directional momentum
Neutral conditions
Weakenin movement
Momentum information is displayed as part of the overall market condition analysis and is intended to provide additional context around pric structure.
Volume Environment Analysis
Volume conditions are included to measure the activity level behind price movement.
The volume module compares current activity against histor volume behavior to classify market participation conditions.
This helps analyze whether pric movement is occurring in:
Higher activ environments
Normal participation conditions
Lower activity environments
Volume information is used as a contextu factor and is not designed to predic future pric movement.
Multi-Factor Market Rating Framework
The data panel combines mul market observations into a summa structural view.
The evaluation considers factors including:
Moving average alig
Moving average direction
Momentum condition
Volume environment
Pric position relative to moving averages
The displayed condition represents the current relationship between these factors and should be interpre as a market context reference rather than a standal tra decision.
Difference From Traditional High/Low Indicators
Traditional high and low indicators generally focus only on locat previous turning points.
ATK/DEF High Low & MA Engine expands this concept by combining:
Swing structure
Trend organization
Momentum context
Volume environment
Market condition overview
The objective is not simply to mark where pric changed direction, but to stu why those histo highs and lows devel within different market environments.
Design Philosophy
Markets are dyna systems where price extremes are created through the interaction of movement, participation, and structure.
This indicator is designed around the idea that a high or low point should be viewe together with its surrou conditions rather than as an isolat pric lev.
By combining structural highs/lows with moving average behavior and market context, the engine provides a more complete visualization of pric behavior.
Features
• Pivot-based swing high and swing low detection
• Three-period moving average structure analysis
• Trend arrangement observation
• Momentum condition display
• Volume environment monitoring
• Market condition dashboard
• Structural high/low visualization
• Multi-factor context evalua
Important Note
ATK/DEF High Low & MA Engine is an analytical tool designed to visualize market structure and histori pric behavior.
It does not provide finan advice, guaran outcomes, or direct tra instructions.
Users should combine this tool with their own analysis, risk manageme, and tra methodology when making decisions. インジケーター

Trend Ribbon [MachineSuiteAI]Trend Ribbon
respect ranking, measured cross odds and auditable statistics
🟦 OVERVIEW
A five-average trend ribbon (8 / 21 / 50 / 100 / 200 by default; EMA, WMA, SMA, HMA or VWMA) built on one idea: the ribbon should measure itself.
Beyond the stack-based trend state and 50/100 cross markers, it keeps auditable statistics on the chart it is loaded on: which average price has actually been respecting (and how reliably), how every 50/100 cross resolved, what happened after squeeze expansions and after trend-health peaks — each statistic with its sample size, and each verifiable on the chart itself, dot by dot. It is built for traders who use layered moving averages and want the chart to answer two questions the ribbon genre normally leaves to folklore: which of these lines matters here, and what have these signals actually done on this symbol?
🟦 WHAT IS A TREND RIBBON?
Moving-average ribbons are a public-domain concept: several averages of increasing length plotted together. When they are stacked in order the trend is orderly; when they compress and interleave the market is ranging; crosses of a slower pair mark regime changes. Published ribbon scripts already color stacks, count touches, score trend strength and detect squeezes.
What the genre does not do is resolve outcomes. A ribbon will mark a "golden cross" without knowing how golden crosses have actually resolved on this chart; it will call an average "support" without a record of how often that support held. This script's contribution sits one level up: measurement with discipline, and evidence you can check.
🟦 WHY THIS SCRIPT IS ORIGINAL
- A cross odds engine. Every 50/100 cross is resolved N bars later (default 10) on the loaded symbol and timeframe: did the close move in the cross's direction? The win rate is tracked and split by volume confirmation, higher-timeframe agreement, and whipsaw-cluster membership — each split with its own sample size, greyed below a minimum. To the author's knowledge no published ribbon resolves its own crosses' outcomes, let alone per filter.
- Evidence-gated chart marks. The ✓ volume mark and ⚠ counter-HTF warning print on cross chips only where the measured split beats the chart's own base rate by a configurable margin with sufficient samples. Filters that have not helped on this chart do not decorate it.
- Auditable statistics. The respect record is drawn on the chart: numbered dots mark the counted touches of the leading average (gold = held, grey = failed) and a grey ✕ marks clean pass-throughs where nothing was tested and nothing entered the record. Every number in the panel can be verified visually — no other script found does this.
- Outcomes attached to the score and the squeeze. The 0–100 health score is not just decomposed from a stated formula — the panel reports how often the primary side was still intact at three horizons after past crossings above 80, on this chart. Squeeze expansions are likewise measured N bars later (median move, direction agreement, samples).
- Recency-weighted respect ranking. Touch counting exists in published scripts; here each average's last 12 touches form a rolling record where the newest touch weighs most, and the gold halo must be earned twice over: both the raw record and the weighted recent form have to clear a threshold. Below it the panel reads LOW RESPECT — price slicing through everything is itself information.
- Readability engineered like the statistics. Six engines share one chart only because the visual rules are strict: line identities never change (white 50, amber 100, thick grey 200 — the respect halo is an underlay beneath the leader's own line, never a recolor), whipsaw crosses are de-emphasized but never deleted so the visible ▲/▼ sequence always alternates, higher-timeframe levels identify themselves with end tags instead of a legend, and every mark on the chart has exactly one meaning. Nothing decorative, nothing unexplained.
🟦 HOW IT WORKS
- Trend state: the 50/100 pair picks the side; the state reads BULL or BEAR only when at least 3 of the 4 adjacent stack pairs agree, otherwise CHOP. Fill opacity scales with alignment.
- Respect engine: every touch of every average runs through a small state machine on confirmed bars. A touch requires the prior close beyond the average, a penetration into a tolerance band (default 0.25 × ATR(14)) and a close back on the original side; consecutive contacts merge into one event. The touch HOLDS if no close crosses the far tolerance edge within the resolve window (default 5 bars). Each average keeps its last 12 resolved touches; the best recency-weighted hold rate (minimum 5 touches) leads the ranking, and the leader earns a soft gold halo under its own line only when raw record and recent form both clear the threshold (default 50%).
- Cross odds engine: as described above — confirmed bars only, fixed-horizon resolution, per-filter splits, evidence-gated chip marks.
- Health score: 0–100 from a stated formula — 40% stack alignment + 25% slope consistency + 20% price position + 15% width behavior. The panel tooltip decomposes the live score and reports the measured survival after 80-crossings at half, full and double the outcome window.
- MTF strip and HTF anchors: a small table shows the 50/100 cross state on five timeframes, and up to three higher-timeframe averages plot as stepped level lines (default: the 50/100/200 one regime up, with an optional corridor fill between the pair, tinted by where price trades). Both are read from the last completed bar of their timeframe with confirmed-bar indexing, so they can appear one higher-timeframe bar late but never rewrite. Anchors render only once their timeframe has a full length of history — young symbols never show statistically meaningless levels.
- Squeeze and expansion: ribbon width (widest minus narrowest core average, as % of price) is percentile-ranked over a lookback (default 250 bars); below the threshold percentile the ribbon is squeezed. Every expansion out of a squeeze is measured N bars later: median move, direction agreement with the ribbon state, and an "A-grade" slice (state agreed with the higher timeframe AND volume confirmed) tracked separately.
- Cluster damping: several crosses inside a short window classify as whipsaw; rapid re-crosses shrink to dimmed dots rather than full chips — de-emphasized, never deleted, so the visible ▲/▼ sequence always alternates. A cross suppressed into a cluster can still print later, once, if the market settles on its side.
All statistics are collected on confirmed bars only.
🟦 HOW TO USE IT
- Line identities stay fixed: white 50, amber 100, thick grey 200, fast pair in the trend color. The pair that generates the signals is always findable.
- Read the panel top-down: state, health, stack, the respected average with its raw record and recent form, cross recency, the measured win-rate splits, then width and expansion.
- A typical workflow: before treating a pullback to an average as meaningful, check that average's record — the gold halo and its numbered dots are the evidence. Before taking a cross, check whether volume or higher-timeframe agreement has historically mattered on this particular chart — the ↑ marks in the odds rows answer that. Use the MTF strip for context and the HTF corridor as the higher-timeframe decision zone.
- Defaults suit swing timeframes (4H–1D); everything is length-adjustable.
🟦 SETTINGS
- Averages: type, five core lengths, up to three optional extras, curated price source.
- Respect engine: halo and audit-dot toggles, touch tolerance, hold window, ranking window, minimum touches, gold threshold, recency decay.
- Health score: panel row toggle, outcome window.
- Cross odds engine: outcome horizon, minimum sample, evidence-mark gating mode, improvement margin.
- MTF cross strip: five timeframes, strip position.
- HTF anchors: auto or fixed anchor timeframe, three levels with lengths and colors, corridor or lines-only rendering.
- Visuals and extras: marker style (chips/dots/off), cluster damping, line-coloring mode (stack state or per-line slope), price-scale labels, squeeze shading, conviction-scaled fill, panel position, colors, volume-confirmation multiple.
🟦 ALERTS
Primary 50/100 cross (bull/bear) · fast 8/21 cross (bull/bear) · full stack aligned (bull/bear) · cross + volume (bull/bear) · squeeze start · squeeze expansion + volume · respected-average touch · respected average changed · health crossed 80 · health dropped below 40.
🟦 REPAINT & DATA NOTES
- Chips, dots and all bookkeeping wait for bar confirmation; the live bar updates until it closes.
- Higher-timeframe reads use the last completed bar of their timeframe: repaint-safe, but up to one higher-timeframe bar late by construction.
- Statistics are computed over the loaded history and reset when the chart reloads with a different amount of history; low timeframes load fewer bars.
- Volume-based features — including the VWMA average type — require a feed that supplies volume.
- TradingView caps a script's labels at 500, so on long intraday histories the oldest cross chips drop off the left edge; the statistics still cover the full loaded history.
- MTF strip rows set below the chart's own timeframe show a dash: a lower timeframe cannot be read repaint-safely from a higher-timeframe chart.
- The higher-timeframe anchor levels can sit far from current price (a weekly 200 on a daily chart, for example), which widens the chart's auto-fitted price scale. Enable "Scale price chart only" in your chart settings — or switch anchors off — if you prefer a tight fit around price.
🟦 CREDITS
Moving averages, ribbons, MA crosses and squeeze concepts are public domain. The implementation — the respect state machine, cross odds engine, evidence gating, health decomposition with measured outcomes, repaint-safe MTF/anchor reads and the audit-dot system — was written from scratch for this script.
🟦 LIMITATIONS
- Moving averages lag; ranging markets whipsaw the state and the crosses. The cluster logic labels that condition, it does not remove it.
- All win rates, hold rates and outcome stats are historical measurements on the loaded chart only. They change with symbol, timeframe and loaded history, are greyed below the minimum sample, and do not predict future results.
- The outcome definition is direction-only over a fixed horizon — no stops, fees, or sizing; this is not a strategy backtest.
🟦 DISCLAIMER
This is an educational analysis tool, not investment advice. Historical measurements, however carefully computed, do not predict future results. Trading involves substantial risk. インジケーター

Trend Direction Zone Trend Direction Zone is a compact trend-state indicator designed to answer one practical question:
Which market direction is currently confirmed by both price position and the movement of the trend line?
The indicator combines a lag-reduced trend line, an adaptive ATR-based zone, and filtered direction-change markers.
These are not separate indicators simply placed on the same chart. All components work together as one unified model for detecting and maintaining the current market direction:
🔹 the central line estimates the underlying direction of price movement;
🔹 the adaptive zone provides current volatility context;
🔹 confirmation filters determine when the active direction is allowed to change;
🔹 triangles mark only confirmed transitions from one direction to the other.
This structure allows traders to assess market direction quickly without cluttering the chart with repeated crossover signals, targets, probability percentages, dashboards, or calculations unrelated to the indicator’s primary purpose.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 How the trend line is calculated
The central trend line calculation begins with an exponential moving average of the selected price source.
A second exponential moving average is then calculated from the first EMA.
The difference between the first and second EMA is used as a lag-compensation component:
Trend Line = EMA + (EMA − EMA of EMA) × Lag Reduction
The Lag Reduction parameter controls how quickly the line responds:
🔹 a value of 0 produces the base EMA;
🔹 higher values allow the line to react more quickly to price changes;
🔹 excessively high values can increase sensitivity and produce greater overshoot during sharp price movements.
The Trend Length parameter defines the primary smoothing period.
Lower values make the line faster and more sensitive. Higher values create a slower and smoother directional reference.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌊 How the adaptive zone works
The colored zone around the central line is calculated using Average True Range — ATR.
Instead of using only a fixed ATR multiplier, the script compares the current ATR value with the highest and lowest ATR values observed during the selected period.
This produces a normalized volatility level showing whether current volatility is relatively low or high compared with its recent range.
The zone width takes into account:
🔹 the current ATR value;
🔹 the position of the current ATR within its recent volatility range;
🔹 the user-defined Zone Width multiplier.
Therefore:
the zone contracts when volatility is relatively low;
the zone expands when volatility is elevated.
The zone is intended to provide volatility context around the trend line.
Its boundaries are not calculated as support, resistance, stop-loss, or profit-target levels.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 How direction is determined
The indicator does not change direction based only on a simple crossover between price and the central line.
For a potential bullish direction, three conditions must be satisfied simultaneously:
🔹 the three-bar slope of the central line must be positive;
🔹 price must be above the central line;
🔹 the distance between price and the line must exceed the ATR-based Switch Filter.
For a potential bearish direction, the opposite conditions are required:
🔹 the slope of the central line must be negative;
🔹 price must be below the central line;
🔹 the distance between price and the line must exceed the selected ATR-based filter.
Before the active direction changes, the new conditions must remain valid for the selected number of closed bars.
The Minimum Bars Between Signals parameter defines the minimum number of bars required between opposite signals.
Its purpose is to reduce rapid switching between bullish and bearish states during short and noisy price movements.
Once a direction has been confirmed, the indicator maintains that state until the opposite direction is confirmed.
Temporary weakening of the current move does not immediately return the indicator to a neutral state.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 How to read the indicator
Green line and green zone
A bullish direction is currently confirmed.
Red line and red zone
A bearish direction is currently confirmed.
Green upward triangle
Marks the confirmation of a new bullish direction.
Red downward triangle
Marks the confirmation of a new bearish direction.
Bullish triangles are always positioned below the central line.
Bearish triangles are always positioned above the central line.
The distance between the triangles and the central line is calculated using ATR. This allows their placement to adapt to the price scale and volatility of the selected instrument.
The Signal Distance From Line parameter changes only the visual distance between the triangle and the central line.
It does not affect the direction calculation or the timing of the signal.
⚠️ The triangles should be interpreted as markers of a confirmed trend-state transition, not as automatic instructions to enter or exit a trade.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Default settings
Trend Length: 20
Lag Reduction: 1.2
ATR Length: 14
Zone Width: 2.0
Direction Confirmation: 2 closed bars
Switch Filter: 0.20 ATR
Minimum Bars Between Signals: 5 bars
Signal Distance From Line: 0.45 ATR
The default values are intended as a balanced starting point.
They are not optimized for any specific instrument, market, or timeframe.
Increasing Trend Length, Direction Confirmation, Switch Filter, or Minimum Bars Between Signals will generally result in:
🔹 fewer direction changes;
🔹 a more persistent trend state;
🔹 later confirmation of a new direction.
Reducing these values generally makes the indicator more responsive, but may increase the number of direction changes during sideways market conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱ Real-time behavior
Direction changes, triangle markers, and alert conditions are confirmed only after the candle has closed.
The central line and adaptive zone use current price and volatility data, so they may move while the active candle is still forming.
A direction triangle is not confirmed on an unfinished candle.
The script uses data only from:
🔹 the current chart symbol;
🔹 the current chart timeframe.
It does not request data from higher timeframes and does not use calculations that reference future values.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alerts
The indicator includes two alert conditions:
Bullish Direction — a bullish direction has been confirmed.
Bearish Direction — a bearish direction has been confirmed.
The alerts correspond to confirmed direction changes.
When creating an alert, it is recommended to select Once Per Bar Close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Limitations
Trend Direction Zone is a visual trend-following tool.
It does not predict future prices or identify exact market tops and bottoms.
Like other trend-following methods, the indicator may confirm a direction change after the reversal has already begun.
In sideways or irregular markets, direction changes may occur without developing into sustained trends.
The confirmation and minimum-signal-spacing filters reduce some short-term switching. However, stronger filtering may also delay the recognition of fast reversals.
A wide zone means that current volatility is elevated relative to recent values.
It does not mean that price must remain inside the zone.
The indicator does not include:
🔹 position-size calculations;
🔹 stop-loss levels;
🔹 profit targets;
🔹 strategy backtesting;
🔹 performance statistics.
Trend Direction Zone should be used as one source of information about current market conditions alongside the trader’s own analysis and risk-management process. インジケーター

[SkuldX] BTC OI Delta + SignalSkuldX BTC OI Delta + Signal — Institutional Positioning Intelligence
by SkuldX Trading Systems
What is it?
SkuldX BTC OI Delta + Signal goes beyond simply showing Open Interest numbers. It decodes the relationship between price movement and OI changes to identify the true nature of every market move — whether it's driven by real conviction or forced liquidations. This distinction is what separates high-probability entries from noise.
How it works
Open Interest Delta measures how many BTC contracts were opened or closed each bar. When combined with price direction, it reveals four distinct market states that form the core of this indicator's signal logic.
The Signal Matrix
🟢 Bullish Trend — price rising + OI increasing. New long positions are being opened. This is genuine buying conviction — the strongest long signal.
🟡 Short Squeeze — price rising + OI decreasing. Shorts are being forcibly closed. Price moves up but no new longs are entering — the move is weak and may not sustain.
🟠 Long Squeeze — price falling + OI increasing. Longs are being liquidated while new shorts open. Counterintuitively, this can precede a reversal once the squeeze exhausts itself.
🔴 Bearish Trend — price falling + OI decreasing. Positions are being closed into a falling market. Strong directional conviction to the downside.
Every histogram bar is color-coded by market state — giving you instant visual context without any manual analysis.
Two-panel layout
Panel 1 — OI Delta Histogram Shows the change in aggregated Open Interest per bar in BTC contracts. An EMA overlay tracks the trend of leverage in the market — rising MA means the market is consistently adding positions, falling MA means deleveraging.
Panel 2 — Z-Score Measures how statistically significant the current OI Delta is relative to recent history. A Z-Score above +2σ means an unusually large OI increase. Below -2σ means an unusually large OI decrease. These extremes often coincide with institutional activity, liquidation cascades, or the start of a significant directional move.
Z-Score levels at ±1σ and ±2σ are displayed with background highlighting for extreme zones.
Data sources
Aggregates perpetual futures Open Interest from five major exchanges — Binance USDT.P, Binance USD.P, Binance BUSD.P, Bybit USDT.P, and OKX USDT.P. Each source can be toggled independently. All values are normalized to BTC contracts for consistent cross-exchange comparison.
Settings
Data Sources — enable or disable each exchange independently
MA Length — EMA period for the delta trend line
Z-Score Lookback — historical window for statistical normalization
Z-Score Levels — configurable ±1σ and ±2σ thresholds
Colors — independent color control for each of the four market states
Signal flags in Data Window
When hovering over any bar, the Data Window shows four binary signal flags — Bullish Trend, Short Squeeze, Long Squeeze, Bearish Trend — alongside raw OI Delta, Total OI, MA, and Z-Score values. These flags are designed to be consumed programmatically in strategy scripts built on top of this indicator.
Notes
Best used on 15m to 4h timeframes where individual OI spikes are meaningful. On very low timeframes (under 5m) noise dominates. The Z-Score panel is most useful for identifying accumulation/distribution phases — sustained readings above +1σ while price consolidates often precede breakouts.
Built for SkuldX ecosystem
This indicator is a core component of the SkuldX signal layer. OI-based market state detection feeds directly into SkuldX automated trading logic for position entry confirmation, squeeze detection, and leverage-driven reversal setups. インジケーター

Swing Trade Scanner Setup Grade and VerdictGrades the stock on your chart as a long swing setup — a 0–100 score, an A+ to D grade, and a plain-English verdict.
You've found a stock. Is it actually a setup? Swing Trade Scanner grades the chart in front of you the way a swing trader reads it — trend, momentum, relative strength, volume — and gives you one honest answer: a score, a grade, and a verdict in plain English.
It works on its own — nothing else required.
Why one score instead of five separate indicators?
Every check in this script exists on its own — but alone, each one whipsaws. What makes a swing setup is confluence: trend, momentum, proximity to highs, relative strength, and volume confirming each other at the same time.
The Scanner's contribution is the weighting and the interaction between the checks: MA alignment counts most because trend is what pays swing traders, and the extension penalty can override an otherwise perfect score — because the same chart that grades well near the fast MA is a bad entry 8% above it. That interaction is what a stack of separate indicators won't show you.
What goes into the score (0–100)
Five checks, each weighted by how much it matters:
MA alignment (up to 35 pts) — is price stacked cleanly above the 4-MA ribbon? A full bull stack (price > fast MA > each slower MA) earns full points.
Momentum (up to 20) — how far price has moved over the lookback (60 bars by default).
Distance from the recent high (up to 20) — leaders sit near their highs; a stock 10% below its high has repair work to do first.
Relative strength vs SPY (up to 15) — is the stock beating the market (SPY = S&P 500 ETF), not just rising with it?
Volume (up to 10) — is it trading above its 20-day average?
Then one guardrail: the extension penalty . More than 6% above the fast MA and the score gets docked (−12 points, −20 past 10%). Chasing a stretched chart is how good setups become bad entries — the Scanner won't grade one highly.
The verdict reads in plain English
HIGH QUALITY (score 75+) — everything lined up.
MODERATE (55–74) — decent, not complete.
WEAK (40–54) — most of the checklist is missing.
AVOID (under 40) — not a long setup right now.
EXTENDED / WAIT — the setup grades well BUT price is stretched more than 6% above the fast MA. Good stock, bad moment. Let it pull in.
What you see on the chart
The 4-MA ribbon — four moving averages (EMA 20 / 50 / 100 / 200 by default; EMA, SMA or WMA), with the zone between the two fastest shaded green in an uptrend, red in a downtrend.
Candle coloring (optional) — green in a full bull stack, teal in a partial one, red in a full bear stack, so the trend state reads at a glance.
The dashboard — grade + score up top, then the four core metrics (MA Alignment, 60-bar Momentum, RS vs SPY, Volume Ratio) and the Verdict row.
Long setups only
This tool grades the long (buy) side. On a downtrending chart it won't invent an opportunity — it shows Full Bear and AVOID and tells you to look elsewhere.
Settings — defaults work out of the box
MA ribbon — four lengths, MA type, and colors.
Lookback (60 bars) — the window for momentum, relative strength, and the recent high.
Volume MA length (20).
Table position, text size, dark/light theme, and status colors.
⚠ Educational tool for reading and grading charts. The grade measures how complete a setup is by these rules — it does not generate buy/sell signals or predict price. Not financial advice. インジケーター

Trade Wzrd - Session Open Strategy ShellTrade Wzrd - Session Open Strategy Shell
WHAT IT IS
Educational strategy shell that only allows new entries while price is inside a user-defined session window. Optional modes: break of the developing session high/low, or a simple MA cross for baseline testing. Orders carry webhook-ready alert_message strings built through a shared open-source string library.
This is a template for learning session-filtered automation wiring. It is not a signal service.
WHY IT EXISTS (ORIGINALITY)
Many public strategies fire all day. Prop and desk workflows usually care about a session (for example cash open or London/NY window) and need clean entry/exit alert text for external execution. This script combines:
1) a session gate
2) optional session-range break entries
3) ATR or fixed risk exits with R-multiple targets
4) structured alert_message strings for BUY/SELL and CLOSE
HOW IT WORKS
1) Session input defines when entries are allowed (chart/exchange timezone rules apply as on TradingView).
2) While in session, the script tracks session high and low.
3) Entry mode A: break above session high or below session low.
4) Entry mode B: EMA cross (for simple tests when break mode is off).
5) Optional max one entry per session day.
6) Stop distance uses ATR multiplier or a fixed distance; take-profit uses risk:reward.
7) alert_message values use comma-separated command text (BUY/SELL with VOL or RISK, SL, TP, TPSLTYPE; CLOSE on exits).
HOW TO USE
1) Add to a clean chart (defaults intended for liquid FX/metals such as XAUUSD).
2) Set the session window to the hours you actually trade.
3) Choose break mode or MA mode under Entry logic.
4) Set Trade Wzrd Automation size mode (VOL or RISK), size value, and TPSLTYPE.
5) Create a strategy alert; set the message to:
{{strategy.order.alert_message}}
6) Point the alert webhook field at whatever endpoint you already use.
7) Use Symbol override when your broker symbol differs from the chart ticker.
DEFAULTS
- Commission and slippage are set in strategy properties for more realistic tests
- Position sizing default is percent of equity for the strategy tester (separate from alert VOL/RISK text)
- Magic default example tag is provided and can be cleared
LIMITATIONS
- Session range break is a simple educational structure, not a complete prop system
- Past results do not predict future results
- Not intended for buy/sell use on non-standard chart types
- You own risk, symbol mapping, and execution choices
No external links are required to understand or use this script.
ストラテジー

Institutional Adaptive VWAP Trend Ribbon ProInstitutional Adaptive VWAP Trend Ribbon Pro
Overview
Institutional Adaptive VWAP Trend Ribbon Pro is an advanced institutional trend-following indicator built from the ground up in Pine Script® Version 6 for traders who want a cleaner understanding of market structure, directional momentum, trend continuation, and potential reversal zones without relying on multiple separate indicators.
Unlike traditional moving averages or standard trend indicators that react slowly to changing market conditions, this indicator combines an Adaptive VWAP Engine, Dynamic Volatility Analysis, Institutional Trend Ribbon, Adaptive ATR Trail, Momentum Evaluation, Trend Strength Scoring, and Smart Confirmation Filters into one unified trading framework.
The primary objective of this indicator is to simplify complex market information into an easy-to-read institutional trend ribbon that visually highlights bullish, bearish, and neutral market conditions while automatically identifying trend transitions and momentum changes.
The indicator is suitable for traders who prefer price action combined with adaptive market analysis rather than fixed moving averages or lagging trend systems.
Why This Indicator Was Developed
Financial markets constantly change their volatility, liquidity, and momentum characteristics. Traditional trend indicators usually operate using fixed calculations, making them less effective during changing market environments.
This indicator was specifically developed to solve several common problems faced by traders:
• Late trend entries
• Frequent false trend reversals
• Choppy market conditions
• Lack of institutional trend visualization
• Difficulty identifying trend strength
• Poor volatility adaptation
• Multiple indicators creating chart clutter
Instead of using several different indicators simultaneously, Institutional Adaptive VWAP Trend Ribbon Pro combines multiple adaptive calculations into a single visual framework.
The result is a cleaner chart while maintaining a large amount of market information.
Core Concept
The indicator continuously evaluates price relative to an Adaptive VWAP while simultaneously measuring volatility, momentum, trend persistence, deviation expansion, and directional strength.
Instead of asking only:
"Is price above or below a moving average?"
the indicator asks a much more advanced question:
"Is there enough institutional evidence to consider this trend healthy, sustainable, and worth following?"
Only after evaluating multiple market conditions does the trend ribbon update its state.
Adaptive VWAP Engine
The heart of this indicator is its Adaptive VWAP Engine.
Instead of relying on only one fixed VWAP calculation, the user may choose different operating modes including:
• Rolling Bars
• Rolling Days
• Daily VWAP
• Weekly VWAP
• Monthly VWAP
Each mode allows the indicator to adapt to different trading styles.
Scalpers may prefer shorter rolling calculations.
Swing traders may choose weekly or monthly anchored VWAP calculations.
This flexibility allows the indicator to remain useful across multiple market environments.
Adaptive Deviation System
Markets constantly expand and contract.
Using fixed-width bands often creates misleading signals during high or low volatility periods.
To solve this issue, the indicator dynamically measures market deviation while simultaneously protecting the band width using ATR.
This prevents the ribbon from collapsing during quiet markets while also allowing it to naturally expand during high volatility periods.
The adaptive deviation envelope therefore reflects actual market conditions rather than static calculations.
Institutional Trend Trail
The indicator continuously builds an adaptive trailing trend line using volatility-adjusted calculations.
Unlike simple ATR trails, this trail automatically adjusts its distance according to current market strength.
During strong trends:
• Trail becomes tighter
• Trend reacts faster
• Pullbacks remain inside the ribbon
During weak trends:
• Trail widens
• Noise is filtered
• False reversals become less frequent
This adaptive behaviour helps create smoother trend transitions.
Institutional Trend Ribbon
One of the most recognizable visual components of the indicator is the Institutional Trend Ribbon.
Instead of drawing a single colored line, the indicator creates multiple gradient layers which produce a professional ribbon effect.
The ribbon changes dynamically according to market conditions.
Green Ribbon
Represents bullish market conditions.
The brighter the ribbon becomes, the stronger the bullish trend.
Red Ribbon
Represents bearish market conditions.
Increasing ribbon intensity indicates strengthening bearish momentum.
Neutral Ribbon
When trend strength becomes weak, the ribbon automatically switches into a neutral state to indicate uncertainty.
This helps traders avoid forcing trades during low-quality market conditions.
Adaptive Glow System
The glow surrounding the ribbon is not simply cosmetic.
Its size automatically changes according to:
• Trend strength
• Volatility
• Momentum
• Recent trend flips
Strong institutional trends produce a wider and brighter glow.
Weak trends produce a smaller glow.
This provides additional visual confirmation without adding chart clutter.
Institutional Trend Strength Engine
One of the most advanced parts of this indicator is its internal Trend Strength Engine.
Rather than using a single measurement, the indicator evaluates multiple market characteristics including:
• Price position relative to VWAP
• VWAP slope
• Price momentum
• Distance from adaptive trail
• Band participation
• ATR expansion
• Trend persistence
• Price velocity
• Volatility regime
These components are combined into a normalized strength score ranging from 0 to 100.
Higher scores indicate stronger institutional participation.
Lower scores indicate weakening momentum or sideways conditions.
Smart Confirmation Filters
Before generating confirmed trend signals, the indicator can evaluate several optional confirmation filters.
These include:
• VWAP confirmation
• Momentum confirmation
• Slope confirmation
• ATR expansion confirmation
• RSI confirmation
• Minimum strength confirmation
These filters allow traders to customize how conservative or aggressive the signals should become.
Buy Signals
Bullish signals appear when:
• Trend flips bullish
• Confirmation requirements are satisfied (depending on settings)
• Institutional trend strength exceeds the selected threshold
Buy markers are plotted directly on the adaptive trend ribbon.
Sell Signals
Bearish signals appear when:
• Trend flips bearish
• Confirmation requirements are satisfied
• Institutional strength requirements are met
Sell markers appear directly on the ribbon for immediate visual recognition.
Candle Coloring
The indicator can automatically paint candles according to trend direction.
Green candles indicate bullish conditions.
Red candles indicate bearish conditions.
Neutral conditions remain unpainted.
This provides instant trend recognition even without watching the ribbon continuously.
Alert System
Multiple alert conditions are included:
• Bullish Trend
• Bearish Trend
• Buy Signal
• Sell Signal
• Trend Change
• Ribbon Flip
• Momentum Expansion
These alerts allow traders to automate notifications without constantly monitoring charts.
Recommended Markets
The indicator has been designed to work across a wide range of liquid financial markets, including:
• Forex
• Gold (XAU/USD)
• Silver
• Stock Indices
• Individual Stocks
• Cryptocurrencies
• Commodities
Recommended Timeframes
Depending on the selected VWAP mode, the indicator can be used on multiple timeframes.
Scalping:
1 Minute
3 Minutes
5 Minutes
Intraday:
15 Minutes
30 Minutes
1 Hour
Swing Trading:
4 Hour
Daily
Important Notes
This indicator is designed as a trend analysis and market structure tool.
Like every technical indicator, it should be used together with sound risk management, proper trade planning, and overall market context.
No indicator can predict future price movement with certainty.
Author Verification Declaration
This indicator has been independently researched, designed, engineered, coded, tested, optimized, and maintained by Forex_Market_Insights.
Every algorithm, visualization method, adaptive calculation, trend engine, ribbon construction, confirmation framework, and implementation included in this publication represents the original work of the author.
The indicator has been developed using Pine Script® Version 6 through independent software engineering practices with the objective of providing a professional institutional trend-following solution for TradingView users.
Original Indicator Script Implementation Verification
Institutional Adaptive VWAP Trend Ribbon Pro is an original implementation created by Forex_Market_Insights.
The script architecture, adaptive VWAP framework, dynamic deviation calculations, institutional trend ribbon visualization, adaptive trailing methodology, trend strength engine, confirmation logic, gradient rendering system, and overall implementation have been independently developed specifically for this indicator.
This publication represents an original Pine Script implementation created for TradingView and reflects the author's own design decisions, coding structure, visualization techniques, and algorithm integration.
Copyright & Ownership Declaration
© Forex_Market_Insights
All original source code, implementation logic, calculations, visualization methods, user interface design, documentation, and accompanying publication text are the intellectual work of Forex_Market_Insights.
This indicator has been created specifically for educational and analytical purposes on TradingView. Unauthorized redistribution, misrepresentation of authorship, or republication of the original implementation without appropriate permission may violate applicable intellectual property rights and TradingView House Rules.
www.tradingview.com インジケーター

インジケーター

Friendly Trend Friendly Trend is an adaptive trend-state indicator designed to answer two practical questions:
Is the current market structure in a confirmed bullish or bearish state?
Do the selected timeframes support the same directional bias?
The indicator simplifies trend reading without reducing the analysis to a basic moving-average crossover.
It combines directional efficiency, normalized price impulse, adaptive smoothing, volatility-sensitive boundaries, confirmation rules, and multi-timeframe context into one coordinated trend model.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧩 WHAT MAKES FRIENDLY TREND DIFFERENT
Friendly Trend is not a collection of unrelated indicators placed on the same chart.
Every component is part of one connected trend-state engine and has a specific role:
• Directional efficiency determines whether price is moving cleanly in one direction or following a noisy path.
• Normalized impulse measures the direction and strength of recent price movement.
• Adaptive smoothing changes the response speed of the trend basis according to current market conditions.
• The volatility model determines how far price must move before a change can qualify as meaningful.
• Slope, momentum, reversal-buffer, and consecutive-bar conditions confirm a new trend state.
• The multi-timeframe dashboard applies the same complete trend engine independently to each selected timeframe.
• The Overall result converts the individual timeframe states into a weighted directional score.
The script uses established mathematical building blocks such as exponential smoothing, True Range, and absolute price change.
Its original contribution is the way these measurements are connected into one adaptive trend-state architecture rather than used as separate signals or combined into a simple indicator mashup.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 DIRECTIONAL EFFICIENCY
The model compares:
• the net distance price has moved over the selected Length;
• the total path travelled by price during the same period.
A relatively direct move produces a higher efficiency value.
A market that repeatedly moves up and down while making little net progress produces a lower efficiency value.
This measurement helps the trend basis behave differently during:
• clean directional movement;
• noisy consolidation;
• uncertain or transitional conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ NORMALIZED IMPULSE
The script separately calculates directional impulse by comparing:
• smoothed signed price changes;
• smoothed absolute price changes.
The result is normalized around zero:
• positive values indicate upward directional pressure;
• negative values indicate downward directional pressure;
• values close to zero indicate weak or balanced movement.
Impulse performs two functions inside the model:
It helps determine how quickly the adaptive basis should react.
It filters trend changes that are not supported by sufficient directional strength.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 ADAPTIVE TREND BASIS
Friendly Trend calculates a faster and a slower smoothed price estimate.
It then blends them according to the current combination of:
• directional efficiency;
• absolute normalized impulse.
During clean directional movement, the faster estimate receives more influence, allowing the basis to follow price more closely.
During noisy or indecisive conditions, the slower estimate receives more influence, reducing unnecessary reactions to minor price fluctuations.
The result is a basis that adapts its response speed instead of using one fixed smoothing behavior in every market condition.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌊 ADAPTIVE TREND ZONE
The trend zone is not based on a fixed percentage or a single ATR value.
Its width combines:
• smoothed True Range;
• the mean absolute distance between price and the adaptive basis;
• the relationship between short-term and long-term volatility;
• the user-defined Band Multiplier.
The short-term versus long-term volatility ratio allows the zone to:
• expand when current market activity increases;
• contract when conditions become calmer;
• adjust to changing volatility regimes.
The volatility ratio is limited to prevent a single extreme movement from distorting the zone for an unnecessarily long period.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ TREND CONFIRMATION
A new bullish state requires all of the following conditions:
• price closes above the upper adaptive boundary;
• the adaptive basis has a positive slope;
• normalized impulse is above the Momentum Filter;
• price clears the additional Reversal Buffer;
• the complete condition remains valid for the selected number of Confirmation Bars.
A bearish state uses the opposite conditions:
• price closes below the lower adaptive boundary;
• the adaptive basis has a negative slope;
• normalized impulse is below the negative Momentum Filter;
• price clears the Reversal Buffer;
• the condition remains valid for the required number of closed bars.
Once a trend is confirmed, the state remains active until the opposite trend passes the same confirmation process.
This persistence is intentional. The trend does not change merely because price returns inside the adaptive zone.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 HOW TO READ THE CHART
🟢 Green basis and green zone
A bullish trend state has been confirmed.
🔴 Red basis and red zone
A bearish trend state has been confirmed.
⚪ Gray basis
The script does not yet have enough confirmed information to assign a bullish or bearish state.
🏷️ Bullish and Bearish labels
A label marks the bar where a new trend state was confirmed.
Labels are not printed on every bar.
The colored zone visualizes the active trend structure. It is not a profit target, stop-loss level, support level, or resistance level.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕒 MULTI-TIMEFRAME DASHBOARD
The dashboard calculates the complete Friendly Trend engine independently on four configurable timeframes.
The default timeframes are:
• 15 minutes;
• 1 hour;
• 4 hours;
• 1 day.
Each row can display one of three states:
• Bullish
• Bearish
• Neutral
The dashboard does not copy the state of the chart timeframe into the other rows.
Each selected timeframe performs its own calculation using the same adaptive trend model.
Higher-timeframe rows use the state of the most recently completed higher-timeframe bar.
When a selected timeframe is lower than the chart timeframe, the script uses a previously completed lower-timeframe state. This conservative approach introduces a small delay but avoids presenting an unfinished lower-timeframe candle as a confirmed trend.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚖️ OVERALL TREND
The Overall result is not calculated through a simple majority vote.
Each timeframe state is converted into a numerical value:
• Bullish = +1
• Bearish = −1
• Neutral = 0
The values are then weighted according to timeframe duration.
Larger timeframes receive more influence through logarithmic weighting, while smaller timeframes continue to contribute to the result.
The normalized score is classified as:
• Bullish when it is above the Overall Threshold;
• Bearish when it is below the negative Overall Threshold;
• Mixed when it remains between the two thresholds.
This means that two short-term bullish readings do not automatically override bearish conditions on both the 4-hour and daily timeframes.
A Mixed result indicates disagreement or insufficient directional alignment. It is not a separate market direction.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ HOW TO USE FRIENDLY TREND
Friendly Trend is designed primarily as a directional filter, not as a complete entry system.
One possible workflow is:
1. Identify the broader bias
Use Overall to understand the weighted multi-timeframe direction.
2. Review timeframe alignment
Check the individual dashboard rows to see where agreement or disagreement occurs.
3. Confirm the local trend
Use the trend state on the chart timeframe as the immediate directional context.
4. Apply an independent entry method
Combine the indicator with your own:
• market-structure setup;
• entry conditions;
• stop placement;
• position-sizing rules;
• exit plan.
5. Treat Mixed conditions cautiously
A Mixed result suggests that directional alignment is weak or divided.
Instead of forcing a bullish or bearish interpretation, traders may choose to reduce directional conviction until the timeframes become more aligned.
For example, a trader may prioritize long setups when both the chart state and Overall are Bullish, while avoiding countertrend setups when the higher timeframes remain strongly Bearish.
This is an example of interpretation, not a trading recommendation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ MAIN SETTINGS
Length
Controls the main observation window used by:
• the directional-efficiency calculation;
• the slower trend basis;
• the long-term volatility model.
Higher values generally produce:
• smoother behavior;
• fewer reactions to short-term changes;
• greater signal delay.
Lower values generally produce:
• faster reactions;
• greater sensitivity to local movement;
• more potential noise.
Band Multiplier
Controls the visible width of the adaptive trend zone.
Higher values:
• require a larger move before the trend can change;
• reduce sensitivity;
• may produce fewer signals.
Lower values:
• make the model more responsive;
• reduce the distance required for a trend change;
• may increase switching during sideways markets.
Confirmation Bars
Defines how many consecutive closed bars must satisfy all trend-change conditions.
A higher value provides stricter confirmation but also delays the signal.
Reversal Buffer
Adds extra distance beyond the displayed adaptive zone before a new trend can be confirmed.
Its purpose is to reduce rapid Bullish and Bearish changes when price repeatedly tests the zone during consolidation.
Momentum Filter
Defines the minimum normalized impulse required for a new trend.
Increasing this value rejects weaker directional moves.
Setting it too high may cause the indicator to miss gradual trends that develop without strong short-term momentum.
Overall Threshold
Controls how much weighted multi-timeframe agreement is required before Overall becomes Bullish or Bearish.
Higher values:
• require stronger agreement;
• produce more Mixed readings.
Lower values:
• classify directional alignment more easily;
• produce Bullish or Bearish results more frequently.
Time Frame 1–4
Define the four periods calculated in the dashboard.
The timeframes can be adjusted to match the user’s trading horizon.
A logical progression from lower to higher periods generally provides the clearest context.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS
The script includes alert conditions for:
• confirmed bullish trend changes on the chart timeframe;
• confirmed bearish trend changes on the chart timeframe;
• any confirmed chart-timeframe trend change;
• bullish and bearish changes for each dashboard timeframe;
• changes of Overall to Bullish;
• changes of Overall to Bearish.
Chart-timeframe trend alerts are based on confirmed bar-close changes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱️ REAL-TIME AND CONFIRMED-BAR BEHAVIOR
The adaptive basis and visible zone can move while the current price bar is still open because they reflect live market data.
However:
• the chart trend state changes only after the bar is confirmed;
• Bullish and Bearish labels are generated only on confirmed chart bars;
• chart-timeframe trend alerts are based on confirmed state changes;
• higher-timeframe dashboard states use completed higher-timeframe bars;
• lower-timeframe dashboard states are intentionally delayed to avoid using an unfinished lower-timeframe candle as a confirmed signal.
Users should distinguish between:
• the live movement of the adaptive basis and zone;
• a confirmed change of trend state.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS
Friendly Trend does not predict future prices.
Like any trend-following model, it may react with delay after a sudden reversal.
Confirmation Bars, the Reversal Buffer, and the Momentum Filter intentionally exchange some response speed for greater trend stability.
Sideways markets can still produce alternating trend states, especially when using:
• a short Length;
• a narrow trend zone;
• low confirmation requirements.
The indicator does not guarantee exact entries, exits, profits, or a specific win rate.
It should be used together with independent analysis and appropriate risk-management rules. インジケーター

Golden Cross Engine [Quantum Algo]Golden Cross Engine
====================================================
🔶 OVERVIEW
Golden Cross Engine is a complete golden cross and death cross indicator that goes far beyond marking the moving average crossover: it counts down to the next cross before it happens, grades every cross by quality, measures what golden and death crosses have actually done on the current symbol with honest statistics, and lets every cross marker settle into its real outcome so the chart itself shows which crosses worked and which failed.
The golden cross — the fast moving average crossing above the slow, classically the 50 over the 200 — is one of the most watched events in all of trading, and the death cross is its bearish mirror. Every major cross makes financial headlines. This engine turns that famous event from a headline into a measurable, projectable, and auditable object on your chart.
🔶 WHAT ARE THE GOLDEN CROSS AND DEATH CROSS?
A golden cross occurs when a faster moving average (traditionally the 50 period) closes above a slower one (traditionally the 200 period), signaling that intermediate momentum has overtaken the long-term trend — historically read as the start of a bullish regime. A death cross is the opposite: the fast average crossing below the slow, read as the start of a bearish regime. Because both averages move slowly, the cross itself is a lagging event — which is exactly why this engine adds a convergence countdown that shows the cross forming before it prints.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. The convergence countdown. The engine measures the current slope of both averages and projects their geometry forward, drawing the two converging paths and marking where and when they would meet: "Golden Cross ≈ 9 bars" with the projected price level. It is a projection at current slopes — clearly labeled as such, never a forecast — and it makes the most-watched lagging signal in trading visible in advance. An approach alert fires when the countdown first enters your chosen lead window.
2. Markers that settle into their outcome. Every cross prints in neutral gold, then resolves twenty bars later: the bullish or bearish color if the cross delivered, faded gray if it failed. The chart becomes its own audit trail — scroll back and see the honest history of every cross on the symbol.
3. Per-symbol cross statistics. Using shrinkage-adjusted win rates and Wilson confidence bounds, the engine reports how often golden and death crosses were favorable on this exact symbol and timeframe at five, twenty, and sixty bars, with sample counts and average moves — on every marker's tooltip and in the dashboard. It answers "does the golden cross actually work here" with data instead of folklore.
4. Cross quality grading. Every cross is graded A, B, or C from three observable conditions: elevated volume at the cross, slope steepness of the fast average, and momentum confirmation of price relative to it. Grade A crosses are the full-confluence events.
5. A living regime fill. The zone between the averages breathes: the bullish or bearish tint intensifies as the gap widens and pales as a cross approaches, so regime strength and regime fatigue are visible at a glance. Cross bars flash once.
6. Multi-timeframe cross state. The dashboard shows whether the fast average is above or below the slow on the fifteen-minute, one-hour, four-hour, daily, and weekly timeframes simultaneously — full-stack regime alignment in two compact rows.
🔶 HOW IT WORKS
Averages: Selectable simple or exponential averages at configurable lengths, defaulting to the classic 50 and 200.
Countdown: The engine computes each average's recent slope and solves the convergence geometry. When the averages are approaching within the horizon, it draws both projected paths, the meeting diamond with the bar count, and the projected level. When they are separating, the dashboard reads Diverging.
Statistics: Each confirmed cross records what price actually did five, twenty, and sixty bars later, in the cross's direction, into capped first-in-first-out databases. Win rates are pulled toward fifty percent by pseudo-samples so a thin history cannot display fake confidence, and each rate carries a Wilson lower bound. Crosses are rare events by nature, so sample counts are honest and often small — markers read "collecting history" until the minimum is met.
Outcome settlement: Each marker stores its cross price; twenty bars later it recolors by the realized directional outcome and joins the capped history.
Grading: Volume z-score, normalized slope steepness, and price-side confirmation combine into the A, B, C grade shown on the marker tooltip and dashboard.
Non-repainting: Crosses, grades, and statistics are evaluated on closed bars. The countdown updates on the live bar by design — it is a live projection, and it is labeled as one.
🔶 HOW TO USE IT
1. The natural home is the daily chart of major symbols — indices, large-capitalization stocks, cryptocurrency — where the 50 and 200 cross is the famous event. Intraday charts work identically with proportionally more crosses and deeper samples.
2. Watch the countdown as regime alarm: a shrinking bar count with a steepening fast average means the regime change is forming in front of you.
3. Read the settled history before trusting a fresh cross: a chart full of gray markers is telling you crossovers chop on this symbol; a chart of colored ones is telling you they trend.
4. Use the grade as confluence: an A-grade cross with volume, steep slope, and price confirmation is a different event from a flat, quiet drift-through.
5. Check the timeframe rows: a golden cross on your chart while the daily and weekly already sit bullish is alignment; against them, it is a counter-trend event.
6. The statistics rows are context, not commands — favorable rates describe this chart's history, never the next cross.
🔶 SETTINGS
- Average type and both lengths.
- Countdown: projection toggle, horizon, and approach alert lead.
- Statistics: sample cap, minimum samples to grade, shrinkage strength, Wilson z-score, markers to keep.
- Visuals: all colors, gradient fill toggle, cross-bar flash toggle.
- Themeable dashboard: position, four text sizes, title band, background, frame, grid, and three text colors.
🔶 ALERTS
- Golden Cross / Death Cross — the crossover confirmed at bar close.
- Golden Cross Approaching / Death Cross Approaching — the countdown first entered the alert lead window at current slopes.
- Grade A Cross — a cross fired with full quality confluence.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Crosses, grades, statistics, and marker settlement are evaluated on closed bars. The countdown is a live-bar projection and is explicitly presented as one.
Is the countdown a prediction? No. It is where the averages meet if both keep their current slopes. Slopes change; the countdown updates with them. Its value is showing the event forming, not promising the date.
Why are the sample counts small? Because genuine crosses are rare — a daily chart may produce only a handful in years of data. The engine shows honest small numbers with confidence bounds instead of inventing large ones, and lower timeframes build deeper samples.
Why did an old cross marker turn gray? It failed: twenty bars after that cross, price had not moved in the cross's direction. Gray markers are the audit trail working.
Which lengths should I use? The classic 50 and 200 define the famous event. Faster pairs produce more crosses and richer statistics at the cost of more noise.
🔶 CREDITS
The golden cross and death cross are classical moving-average crossover concepts in the public domain of technical analysis, watched across generations of market participants. The Wilson score interval is by Edwin B. Wilson (1927), and shrinkage estimation is standard public statistics. This script gratefully acknowledges that shared lineage. The convergence countdown and projection geometry, the outcome-settling markers, the per-symbol statistical grading, the living regime fill, and all code in this script are original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Moving average crossovers are lagging by construction, and the countdown inherits the assumption of stable slopes. Cross samples are naturally small on higher timeframes; statistics mature with history and faster settings. Volume grading is less meaningful on symbols with unreliable volume reporting. Multi-timeframe rows describe state, not signals. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any cross, projection, or statistic does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently. インジケーター
