TF: ERAMA Trend (ET)TradingFlow: ERAMA Trend (ET)
TradingFlow: ERAMA Trend (ET) turns the Efficiency Ratio Adaptive Moving Average ( ERAMA ) into a color-coded trend-line tool. Regression slope identifies rising and falling direction, while ATR-normalized movement identifies confirmed flat-trend conditions with a hysteresis boundary for steadier state changes.
ET offers two independently configurable ERAMA lines, and users can display either one or both. They can be used as a fast/slow pair, or assigned separate roles: one for shorter-term trend context and the other for the longer-term main trend. The default EMA lengths are 20 and 200. Each displayed line receives its own length-adjusted lag reduction and trend-state classification while sharing the same price source and adaptive core.
How the ERAMA Core Is Calculated
1. Efficiency Ratio
ERAMA first measures how efficiently the selected Source has moved over the ER Length:
Change = |Source − Source from ER Length bars ago|
Volatility = Sum of |Source − Previous Source| over the ER Length
ER = Change ÷ Volatility
The Efficiency Ratio stays between 0 and 1. A reading near 1 means most movement contributed to net progress in one direction. A reading near 0 means price traveled back and forth with little net progress relative to its total path.
2. Efficiency-Adaptive EMA Blend
The Fast and Slow lengths create two EMAs of the same Source:
Fast EMA = EMA(Source, Fast Length)
Slow EMA = EMA(Source, Slow Length)
Adaptive = Slow EMA + ER × (Fast EMA − Slow EMA)
High ER moves the adaptive result toward the Fast EMA. Low ER keeps it closer to the Slow EMA. This uses Kaufman's Efficiency Ratio as an adaptive weight, but it is not the standard recursive Kaufman Adaptive Moving Average (KAMA) formula.
3. Shared WMA Base
Both ERAMA lines use the same adaptive blend and WMA stage:
WMA Base = WMA(Adaptive, WMA Smooth Length)
Sharing this base ensures that differences between the two displayed lines come from their EMA lengths and corresponding lag-reduction scales, not from separate ER measurements.
4. Per-Line Smoothing and Lag Reduction
Each line applies its own EMA length N:
Smoothed(N) = EMA(WMA Base, N)
Responsiveness Scale(N) = Min(1, 50 ÷ N)^Responsiveness Length Decay
Effective Responsiveness(N) = Responsiveness × Responsiveness Scale(N)
ERAMA(N) = Smoothed(N) + Effective Responsiveness(N) ×
The final difference term is a partial DEMA-style lag correction. For EMA lengths of 50 or less, the full selected Responsiveness is used. Above 50, Responsiveness decreases gradually according to the length-decay setting. This lets the shorter and longer ERAMA lines share one control without applying the same correction strength indiscriminately across very different horizons.
5. Direction Classification
Each line's direction is measured independently using its linear-regression slope over the Flat Confirmation Period:
Slope(N) = LinReg − LinReg
A positive slope sets that line's confirmed direction to rising. A negative slope sets it to falling. If the slope is exactly zero, the previous non-zero direction is retained.
6. ATR-Normalized Flat State
Flatness is also calculated independently for each ERAMA line:
Average Movement(N) = SMA(|ERAMA(N) − Previous ERAMA(N)|, Flat Confirmation Period)
Normalized Movement(N) = Average Movement(N) ÷ ATR(14)
A line enters its flat state when Normalized Movement is at or below the Flat Movement Threshold. It exits only after movement rises above 1.5 times the threshold. These separate entry and exit levels create hysteresis and reduce rapid gray/color switching near the boundary.
Direction and flat-state changes are committed on confirmed bars. The ERAMA values themselves can still update with the current open bar.
Using One or Two ERAMA Lines
Each ERAMA line functions as an independent color-coded trend line. Users can choose the arrangement that best fits their workflow:
• Display one line as a standalone trend tool
• Display both lines as a fast/slow pair
• Use ERAMA 1 for shorter-term trend context and ERAMA 2 for the longer-term main trend
The defaults use EMA lengths of 20 and 200, but both are configurable. Because the lines share the same Efficiency Ratio, EMA anchors, and WMA base, differences between them come from their smoothing horizons and length-adjusted lag reduction. Each line remains independently interpretable.
How to Read ERAMA Trend
Green — Rising
Green indicates a confirmed positive regression slope and a non-flat state. Price holding above a rising ERAMA supports a bullish directional interpretation for that line's horizon.
Red — Falling
Red indicates a confirmed negative regression slope and a non-flat state. Price holding below a falling ERAMA supports a bearish directional interpretation for that line's horizon.
Gray — Flat
Gray means the line's average movement is small relative to ATR. This often appears during consolidation, compression, or transition. Flatness is evaluated separately, so one ERAMA can be gray while the other remains directional.
Agreement Between the Lines
When both ERAMA lines rise, short- and long-horizon direction agree to the upside. When both fall, they agree to the downside. Mixed colors indicate that the two horizons are moving differently, which can occur during pullbacks, early reversals, or broader trend transitions. The relative position and crossings of the two lines provide additional context about trend alignment and transition.
Single-Color Mode
Disabling Color Lines by Trend removes the state colors. ERAMA 1 is then displayed in aqua and ERAMA 2 in gold. Their calculations do not change.
Understanding the Settings
Source
Selects the shared price series. The default is HLCC4: the average of High, Low, Close, and Close.
ER Length
Controls the shared Efficiency Ratio window. Lower values react to recent path changes sooner. Higher values evaluate directional efficiency over a broader sample.
Fast Length
Sets the Fast EMA anchor used by the shared adaptive blend. Fast Length must be lower than Slow Length.
Slow Length
Sets the Slow EMA anchor used by the shared adaptive blend. Slow Length must be higher than Fast Length.
Responsiveness
Controls the base strength of the partial DEMA-style lag correction. Higher values reduce more lag but can increase turning sensitivity and overshoot.
Responsiveness Length Decay
Controls how strongly Responsiveness decreases for EMA lengths above 50. Higher values apply a larger reduction to longer-period lines. A value of 0 disables length-based scaling.
WMA Smooth Length
Controls the shared WMA stage before the two output branches. Higher values create a steadier base with more delay.
ERAMA 1 EMA Length
Controls the first line's smoothing horizon and lag-reduction period. Its default is 20.
ERAMA 2 EMA Length
Controls the second line's smoothing horizon and lag-reduction period. Its default is 200.
Color Lines by Trend
Enables independent green, red, and gray state colors. When disabled, the lines use fixed aqua and gold colors.
Flat Confirmation Period
Controls the regression-slope window and average-movement window used by both lines. Higher values create steadier but slower state changes.
Flat Movement Threshold
Sets the maximum average ERAMA movement, measured in ATR units per bar, that is considered flat. Higher values classify more conditions as flat. Each line must exceed 1.5 times this threshold to leave the flat state.
Practical Use
ERAMA Trend can be used as a color-coded trend baseline, adaptive pullback reference, directional filter, or trend-management tool. A single line can represent the user's preferred trend horizon. When both lines are shown, the shorter line can provide earlier context while the longer line frames the main trend.
Colors provide a compact summary of each line's slope and movement state. The two configurable horizons can be combined with price structure to build a trend-reading framework suited to the user's timeframe.
---
TradingFlow: ERAMA Trend (ET)
TradingFlow: ERAMA Trend (ET) 把效率比率自適應移動平均線( ERAMA )轉化為具顏色狀態的趨勢線工具。線性回歸斜率用來識別上升與下降方向;ATR 標準化移動則識別已確認的平坦趨勢,並透過遲滯邊界令狀態轉換更穩定。
ET 提供兩條可獨立調整的 ERAMA 線,使用者可選擇顯示其中一條或同時顯示兩條。它們可作為 Fast/Slow 雙線組合,亦可分別擔任不同角色:一條觀察較短期趨勢,另一條界定較長期主趨勢。預設 EMA 長度為 20 與 200。每條顯示線都有自己按長度調整的延遲縮減及趨勢狀態分類,同時共用價格來源及自適應核心。
ERAMA 核心如何計算
1. 效率比率
ERAMA 先衡量所選 Source 在 ER Length 期間內的移動效率:
變化 = |目前 Source − ER Length 之前的 Source|
波動 = ER Length 內每根 K 線之 |Source − 前一個 Source| 總和
ER = 變化 ÷ 波動
效率比率保持在 0 至 1 之間。接近 1 表示大部分移動形成單一方向的淨進展;接近 0 則表示價格反覆來回,相對總路徑只有有限淨進展。
2. 效率自適應 EMA 混合
Fast 與 Slow 長度會從同一 Source 建立兩條 EMA:
Fast EMA = EMA(Source,Fast Length)
Slow EMA = EMA(Source,Slow Length)
Adaptive = Slow EMA + ER ×(Fast EMA − Slow EMA)
ER 偏高時,自適應結果會靠近 Fast EMA;ER 偏低時,則靠近 Slow EMA。這個結構使用考夫曼效率比率作為自適應權重,但並不是標準的遞迴考夫曼自適應移動平均線(KAMA)公式。
3. 共用 WMA 基準
兩條 ERAMA 使用同一個自適應混合結果及 WMA 階段:
WMA Base = WMA(Adaptive,WMA Smooth Length)
共用基準確保兩條線之間的差異來自 EMA 長度及相應的延遲縮減,而不是使用不同的 ER 量度。
4. 每條線的平滑及延遲縮減
每條線分別套用自己的 EMA 長度 N:
Smoothed(N) = EMA(WMA Base,N)
Responsiveness Scale(N) = Min(1,50 ÷ N)^Responsiveness Length Decay
Effective Responsiveness(N) = Responsiveness × Responsiveness Scale(N)
ERAMA(N) = Smoothed(N) + Effective Responsiveness(N) ×
最後的差值項是部分 DEMA 式延遲修正。EMA 長度為 50 或以下時,會完整使用所選 Responsiveness;高於 50 後,Responsiveness 會按 Length Decay 逐步下降,讓長短週期共用同一設定時,不會不加區分地套用相同修正強度。
5. 方向分類
每條線都使用 Flat Confirmation Period 內的線性回歸斜率,獨立判斷方向:
Slope(N) = LinReg − LinReg
正斜率會把該線的已確認方向設為上升;負斜率則設為下降。斜率剛好等於零時,會保留上一個非零方向。
6. ATR 標準化平坦狀態
每條 ERAMA 的平坦程度亦會獨立計算:
Average Movement(N) = SMA(|ERAMA(N) − 前一個 ERAMA(N)|,Flat Confirmation Period)
Normalized Movement(N) = Average Movement(N) ÷ ATR(14)
當 Normalized Movement 小於或等於 Flat Movement Threshold,該線會進入平坦狀態;只有在移動升穿門檻的 1.5 倍後才會退出。不同的進入及退出門檻形成遲滯,可減少邊界附近灰色與方向顏色的頻繁切換。
方向及平坦狀態只會在 K 線確認後更新;ERAMA 數值本身仍可隨目前未收市 K 線變化。
使用一條或兩條 ERAMA
每條 ERAMA 都可獨立作為具顏色狀態的趨勢線。使用者可根據自己的方法選擇顯示方式:
• 只顯示一條線,作為獨立趨勢工具
• 同時顯示兩條線,作為 Fast/Slow 組合
• 使用 ERAMA 1 觀察較短期趨勢,並以 ERAMA 2 作為較長期主趨勢
預設 EMA 長度為 20 與 200,但兩者都可調整。由於兩條線共用效率比率、Fast/Slow EMA 錨點及 WMA 基準,它們之間的差異來自平滑週期及按長度調整的延遲縮減。每條線都可獨立解讀。
如何閱讀 ERAMA Trend
綠色 — 上升
綠色表示已確認的正線性回歸斜率,而且目前不處於平坦狀態。價格維持在上升 ERAMA 之上,可支持該線所代表週期的偏多方向判斷。
紅色 — 下降
紅色表示已確認的負線性回歸斜率,而且目前不處於平坦狀態。價格維持在下降 ERAMA 之下,可支持該線所代表週期的偏空方向判斷。
灰色 — 平坦
灰色表示線條的平均移動相對 ATR 較小,常見於整固、壓縮或轉換階段。兩條線的平坦狀態獨立判斷,因此其中一條可以顯示灰色,而另一條仍保持方向顏色。
兩條線的方向配合
兩條 ERAMA 同時上升,表示短期與長期方向均偏上;兩者同時下降,則表示兩個週期均偏下。顏色不一致代表兩個週期的移動方向不同,可能出現在回調、早期反轉或較大型趨勢轉換期間。兩條線的相對位置及交叉,可進一步提供趨勢配合及轉換背景。
單色模式
關閉 Color Lines by Trend 後,狀態顏色會停用。ERAMA 1 會以水藍色顯示,ERAMA 2 則使用金色;兩條線的計算不會改變。
設定說明
Source
選擇共用價格序列。預設為 HLCC4,即 High、Low、Close、Close 的平均值。
ER Length
控制共用效率比率的計算期間。較低數值會更快反映近期路徑變化;較高數值則在較廣樣本內評估方向效率。
Fast Length
設定共用自適應混合使用的 Fast EMA 錨點。Fast Length 必須低於 Slow Length。
Slow Length
設定共用自適應混合使用的 Slow EMA 錨點。Slow Length 必須高於 Fast Length。
Responsiveness
控制部分 DEMA 式延遲修正的基本強度。較高數值會追回更多延遲,但亦可能增加轉向靈敏度及超調。
Responsiveness Length Decay
控制 EMA 長度高於 50 後,Responsiveness 隨長度下降的幅度。較高數值會對長週期線條施加較大降幅;設為 0 會停用按長度縮放。
WMA Smooth Length
控制兩條輸出分支之前的共用 WMA 階段。較高數值會形成更穩定但延遲更多的基準。
ERAMA 1 EMA Length
控制第一條線的平滑週期及延遲縮減週期,預設值為 20。
ERAMA 2 EMA Length
控制第二條線的平滑週期及延遲縮減週期,預設值為 200。
Color Lines by Trend
啟用每條線獨立的綠色、紅色及灰色狀態。關閉後,兩條線分別使用固定水藍色及金色。
Flat Confirmation Period
控制兩條線使用的回歸斜率及平均移動期間。較高數值會令狀態變化更穩定但較慢。
Flat Movement Threshold
設定每根 K 線平均 ERAMA 移動的上限,並以 ATR 單位表示。較高數值會把更多市況分類為平坦;每條線必須升穿門檻的 1.5 倍才會退出平坦狀態。
實際應用
ERAMA Trend 可作為具顏色狀態的趨勢基準、自適應回調參考、方向過濾器或趨勢管理工具。單一線條可代表使用者所選的趨勢週期;同時顯示兩條時,較短線可提供較早背景,較長線則用來界定主趨勢。
顏色可簡潔概括每條線的斜率及移動狀態。兩個可調整週期可與價格結構配合,建立適合使用者時間週期的趨勢解讀框架。
Indicator

Indicator

Zone Flow S/R StrategyZone Flow S/R Strategy
📌 Strategy Overview
Zone Flow is a multi‑timeframe support/resistance strategy that uses dynamic pivot‑derived zones to identify high‑probability reversal and breakout setups.
Unlike static support/resistance lines, this 9‑level zone system (R4–R1, P, S1–S4) automatically adapts to market structure changes at each new period (Daily/Weekly/Monthly). Each zone has a configurable width (Percentage, ATR, or Fixed) to account for volatility, and a breakout threshold to filter out minor wicks.
# Unique Synergy
Most pivot strategies treat levels as static lines, leading to false breakouts. Most engulfing strategies ignore the bigger picture, catching falling knives. This strategy solves both problems by combining these components in a specific sequence:
1- Dynamic Zones + Gap State Machine (The Context)
Instead of just drawing lines, we create zones (R1-R4, P, S1-S4) with adaptive width. More importantly, the Gap State Machine tracks which gap price sits in (e.g., between R1 and Pivot). This tells us exactly where we are in the market structure. If price moves from upper Gap to lower Gap, the strategy instantly switches sentiment from Bullish to Bearish.
- Why this matters: It prevents the strategy from trading blindly; it only trades when price is transitioning between structural levels, and price retrace to the zone drastically reducing false signals in the middle of nowhere.
2- Pin Bar Sweep + Engulfing Combo (The Momentum Trigger)
A standard pin bar alone is a weak reversal signal. A standard engulfing pattern alone is common. However, when a Pin Bar sweeps the N-bar high/low (proving a breakout attempt failed) and is immediately followed by an Engulfing pattern on the next candle, this combo represents a "double confirmation" of exhaustion.
Crucially, this specific combo overrides the EMA confirmation.
- Why this matters: Strong momentum sweeps often happen against the short-term EMA trend. By allowing this specific combo to bypass the EMA, the strategy captures powerful reversals that pure trend-following strategies miss.
3- Dynamic Zone Width (The Volatility Adaptation)
Instead of using fixed support/resistance, the zone width changes based on the selected Period's ATR or Percentage.
- Why this matters: This ensures the strategy scales perfectly across any asset (Gold, Crypto, Forex) without manual width adjustments, making it robust across different volatility regimes.
4- Selective Zone Activation (The Manual Override)
Unlike standard pivot systems that force trades on every level, the Zone Selection inputs allow users to disable specific zones (e.g., turn off R3 if price often fakes out there or turn off S4 market is always get exhausted lower probability trade).
- Why this matters: This turns the strategy from a rigid algorithm into a customizable framework where the user can apply their own discretion based on historical price behavior.
5. Hierarchical EMA Architecture (The Structural Governor)
This strategy does not treat all EMAs equally. It uses a two-tier EMA system with a strict hierarchy:
Lower TF EMA (Optional & Overrideable): The Lower TF EMA on the current timeframe acts as a micro-trend filter. However, as explained above, the Pin Bar Sweep + Engulfing Combo can override this filter. Why? Because strong institutional reversals often happen against the short-term trend, and we want to capture them.
Higher TF EMA (Absolute & Non-Negotiable): Higher TF EMA on the selected Higher Timeframe acts as an "Absolute Structural Governor." Unlike the lower EMA, this filter cannot be overridden by any pattern.
For Long entries: Price must be above this HTF EMA.
For Short entries: Price must be below this HTF EMA.
Most strategies either ignore the HTF entirely. By making the HTF EMA absolute and the LTF EMA overrideable, this strategy achieves the perfect balance:
The HTF EMA prevents catastrophic drawdowns by keeping you on the right side of the bigger trend.
The LTF EMA override allows you to catch sharp, high-probability reversals within that trend without being delayed by a slow-moving micro-filter.
6. Optional Risk Architecture (The Management Layer)
The strategy includes a built-in partial-take-profit and breakeven module. By default, this module is disabled to provide a clean, straightforward 1:3 risk-reward backtest without the complexity of multiple exit orders.
This default setting allows users to evaluate the core entry logic (zones + patterns) without interference from partial exits.
However, for traders who want to reduce psychological pressure or manage Gold's notorious retracements, they can enable Allow Breakeven and Allow Partial TP. When activated, the strategy closes a percentage of the position (e.g., 50%) at a lower R:R threshold (TP1) and moves the remaining position to breakeven—locking in early profits while letting the rest of the trade run.
# Zone Calculation
The strategy calculates 9 zones using a modified pivot point formula from the selected period (Daily, Weekly, Monthly, Quarterly, Yearly):
The pivot formula can be one of 5 methods: Classic, Fibonacci, Woodie, Camarilla, or DM.
The Classic Pivot (shown below) is the most widely used and serves as the default:
Pivot (P) = (H + L + C) / 3
R1 = (2 × P) – L
S1 = (2 × P) – H
R2 = P + (H – L)
S2 = P – (H – L)
(R3, R4, S3, S4 are logical extensions of this same principle)
Additional Methods (Briefly Explained):
Fibonacci: Uses the golden ratio multipliers (0.382, 0.618, 1.000, 1.618) to place support/resistance levels between the pivot and the high/low range.
Woodie: Gives extra weight to the closing price (Formula: P = (H + L + 2C) / 4), making it more sensitive to the current session's momentum.
Camarilla: Uses multipliers based on the previous range to place levels very close to the current price, ideal for range-bound trading and scalping.
DM: Adjusts the pivot formula conditionally based on whether the close was higher or lower than the open, making it adaptive to daily sentiment.
From these, the strategy derives:
- 4 Resistance Zones (R4, R3, R2, R1) – above the pivot
- 1 Pivot Zone (P)
- 4 Support Zones (S1, S2, S3, S4) – below the pivot
Each zone is expanded by a Zone Width to create a buffer, making the levels more practical.
# Zone Width Calculation
Three modes:
- Percentage – zone width as a percentage of current price
- ATR Multiplier – width = ATR × Multiplier
- Fixed – fixed price distance
# Gap Index Mapping (0–9):
Gap 0 – Above R4 → Aggressive (no trades)
Gap 1 – Between R4 and R3 → Bearish near R4, Bullish near R3
Gap 2 – Between R3 and R2 → Bearish near R3, Bullish near R2
Gap 3 – Between R2 and R1 → Bearish near R2, Bullish near R1
Gap 4 – Between R1 and Pivot → Bearish near R1, Bullish near Pivot
Gap 5 – Between Pivot and S1 → Bearish near Pivot, Bullish near S1
Gap 6 – Between S1 and S2 → Bearish near S1, Bullish near S2
Gap 7 – Between S2 and S3 → Bearish near S2, Bullish near S3
Gap 8 – Between S3 and S4 → Bearish near S3, Bullish near S4
Gap 9 – Below S4 → Aggressive (no trades)
Based on the gap index and price action, the strategy sets allowLong or allowShort – and displays the status on the info table.
Market Status Displayed:
- Bullish – near support zones; long trades allowed
- Bearish – near resistance zones; short trades allowed
- Waiting – new period started; zones recalculating; no trades
- Aggressive – above R4 or below S4; no trades
- Zone disabled – manually disabled zone; no trades
# Entry Signals
1. Engulfing Patterns
Detects bullish and bearish engulfing with filters:
- Body Only – if true, only bodies must engulf (not full range)
- Min/Max Range – can be Percentage, ATR Multiplier, or Fixed
- Gap Allowance – max price gap between previous close and current open
- Previous or Prior Candle – at least one of the last two candles must be the opposite. color (bearish for bullish engulf; bullish for bearish engulf).
This is not a random condition. The strategy only considers trades when price is near a strong structural zone (support/resistance). Because the zone itself provides the primary context for a potential reversal, the immediate previous candle does not need to be strictly opposite in color.By relaxing the requirement to "at least one of the last two," the strategy captures valid reversals at key levels that a strict, textbook rule would miss—while remaining highly selective because it only trades near strong zones.
2. Pin Bar + Engulfing Combo (EMA Override)
Identifies hammers/shooting stars with:
- Wick/Body Ratio (Wick 3× body)Requires a clearly defined pin bar with a very small body.
- Max Body/Range (Body is at most 20% of range) Ensures the body is genuinely small relative to the total range. This is the textbook definition of a pin bar/hammer. Captures true rejection candles.
- Min Wick/Range (70% of range) This is the classic pin bar definition. A 70%+ wick means price aggressively rejected the level and reversed.
- Sweep Lookback – bullish pinbar must break the lowest low of the previous N bars;
bearish must break the highest high
a pin bar that sweeps a recent extreme (lookback) and the very next candle forms an engulfing pattern in the same direction. This combo overrides the Lower TF EMA confirmation – a unique feature that captures strong momentum after a sweep.
Combined Entry Requirements
All of the following must be true:
1. Valid engulfing or pin+engulf combo
2. Pattern occurs near a zone (open inside zone boundaries or crossing it)
3. Market status aligns with trade direction
4. Daily trade limit not exceeded (default: 2)
5. Relevant zone is enabled
6. Price is on the correct side of EMAs (unless overridden by combo)
7. HTF EMA confirms (if enabled)
8. RSI not overbought/oversold (if enabled)
9. Not within the no‑trade window (if enabled)
-----------------------------------------------------
# Confirmation Filters
Current TF EMA – ensures micro‑trend alignment. Overridden by pin+engulf combo.
Higher TF EMA (default 150 on 1H) – filters out counter‑trend moves in the bigger picture.
RSI – prevents buying above 70 and selling below 30.
Bollinger Bands – blocks trades when volatility is too low (BB width below threshold).This filter is specifically designed for assets that range heavily—choppy, sideways markets.
No‑Trade Window – avoids end‑of‑day volatility (active only for timeframes ≤15min).
# Risk & Position Management
1- Position Sizing:
- Risk per trade – percentage of equity for first trade, separate for second
- Position size = (Account Risk) / (Entry – SL distance).
- Second trade does not increment the daily trade counter:
This is a deliberate design choice. The daily trade counter tracks new trade initiations, not total positions. The second trade (pyramiding) is considered a continuation of the existing position, not a new independent decision. This ensures the strategy can scale into strong trends without consuming the daily limit, while still respecting the maximum number of new entries per session.
2-Stop Loss Options:
- Low-High – entry bar low/high ± buffer Tight, reactive stops. Best for scalping or when you want the SL to follow the immediate price action of the entry candle.
- Swing high/low – N-bar low/high ± buffer Broader, structural stops. Ideal for swing trading or when you want the SL to respect recent market structure rather than a single bar.
- Zone – zone boundary ± buffer Structural stops aligned with pivot levels. Best when you want the SL to be placed exactly at the structural support/resistance level that defines the trade.
- Fixed distance – fixed price distance Simple, static stops. Useful when you know your exact risk tolerance in dollar/pip terms and want a consistent SL distance regardless of volatility.
- ATR Multiplier – entry ± (ATR × multiplier) Volatility-adaptive stops. Best for Gold's changing volatility—widens during news/high volatility, tightens during calm periods.
3- Take Profit:
- Main R:R ratio – main R:R ratio (default 1:3), plus optional partial TP and breakeven at a lower R:R ratio.
- Partial TP – close a percentage of position at a lower R:R (TP1)
- Breakeven – optionally move stop to entry at TP1
4- Trade Counter Reset:
- For TF ≤ 15m: resets at NY (9:30 AM) and London (3:30 AM) starts (configurable)
This aligns with Gold's session-specific volatility and allows fresh participation in each session while preventing over-trading within a single session.
- For TF > 15m: resets once per day at session start (Every new day) Session-specific behavior is less relevant on higher timeframes, and a simple daily cap is more appropriate for swing trading.
5- No‑Trade Window:
- Avoids high‑volatility periods (e.g., end of day)
- Active only for TF ≤ 15m (16:00 PM – 18:30 PM NY time, configurable) End-of-day volatility spikes can cause excessive slippage and erratic price action on short timeframes. on TF > 15 The window is too short to be meaningful; higher timeframe traders are less affected by brief volatility spikes.
6- Session Close:
- TF ≤ 15m: can close at day end and/or week end (configurable). Scalping trades on 1m–15m charts typically last minutes to a few hours. These trades are highly sensitive to Overnight gaps, Weekend gaps
- 15m < TF ≤ 10h: only week end. Swing trading on 30m–4H charts typically lasts hours to several days.
- TF > 10h: feature disabled. Position trading on daily+ charts lasts days to weeks. These trades aim to capture large macro moves.
# Chart Display
- Zone boxes – semi‑transparent red/pink with labels (R4…S4), auto‑cleanup (max 55 periods)
- Trade management lines – entry (white), SL (red), TP (green), TP1/breakeven (dashed),
with green/red fills; auto‑cleanup ((4) * max 125)
- Info table (top‑right) :
1. shows Market Status(Bullish/Bearish/Aggressive/Waiting).
2. EMA confirmations.
3. Zone Width, Breakout threshold.
4. Engulf range max min.
5. SL settings(SL refrence, sL bufer)
- EMA plots – light blue (lower TF) and light red (higher TF)
- Signal shapes – hidden by default (can be enabled via style settings)
- arrowdown shapes - "Reset trade counter"
- Background 1 color – yellow during no‑trade window
- Background 2 color – white close all position on week/day end.
UI Note: Inputs are hidden from the status line to keep your chart clean. All settings (zones, EMAs, risk, patterns) remain fully adjustable in Settings → Inputs.
# Default Settings – Optimized for XAUUSD (Gold)
All default values have been calibrated specifically for Gold's typical volatility and intraday structure.
(Setting : Default : Why This Works for Gold)
----------------------------------------------------------------------------------------
Period : Daily : Gold respects daily highs/lows as key structural levels.
-----------------------------------------------------------------------------------------
Pivot Type : Classic : Most widely used and reliable for Gold.
-----------------------------------------------------------------------------------------
Zone Width : ATR (0.053× ATR(14)) : ATR(14) provides a stable, week-to-week view of Gold's volatility (roughly two trading weeks of data).Adapts to Gold's daily volatility (Zone Width often $4–$10 range).
-----------------------------------------------------------------------------------------
Breakout Threshold : 7% of zone width : Zone width ≈ $3.00–$10.00 (Daily ATR × 0.053). 7% ≈ $0.21–$0.70 (21–70 ticks)—filters noise wicks, captures genuine breaks.Prevents false transitions caused by standard stop-hunting wicks
-----------------------------------------------------------------------------------------
Engulfing Range : ATR(14) (0.375× – 2.5×) : ATR(14) sits in the "sweet spot"—responsive enough to capture shifts in Gold's volatility relatively quickly, yet long enough to smooth out the daily noise and provide a reliable, consistent measure. Captures meaningful moves $3–$15—ensures candle has enough size to be meaningful, rejecting tiny $0.30–$0.50 noise patterns, while filtering out massive blow-off spikes (> $20–$25 on 15m).
-----------------------------------------------------------------------------------------
Pin Bar Sweep : 12 bars : 12 bars – Calibrated for Gold's 3-hour intraday cycle and session transitions. Long enough to capture genuine liquidity grabs, short enough to avoid outdated levels.
-----------------------------------------------------------------------------------------
Risk per trade : 2% (1st), 1% (2nd) : Balances risk with Gold's occasional false breakouts. For Gold's volatile nature, 2%-1% provides the best balance between survival and growth.
-----------------------------------------------------------------------------------------
Risk:Reward : 1:3 : Gold routinely moves 1.5–2× its ATR in a single directional push. A 1:3 target is well within Gold's typical daily range.
-----------------------------------------------------------------------------------------
Stop-Loss Reference : ATR Multiplier : For Gold's volatile nature, a static stop-loss (Fixed or Low-High) cannot adapt to changing volatility. ATR-based SL scales with market conditions—widening during high volatility (news, session opens) and tightening during calm periods. This ensures the stop-loss is always "fair" relative to current market conditions, preventing premature stops during normal volatility spikes
-----------------------------------------------------------------------------------------
Stop-Loss Multiplier : 1.8× ATR(14) : A 1.8× ATR(14) stop-loss represents 1.8 times Gold's average 14-period range. Why 1.8× and not 2.0× or 1.5×? Backtesting revealed that 1.8× is the "sweet spot"—wide enough to survive Gold's normal volatility spikes without being stopped out by noise, yet tight enough to limit losses
-----------------------------------------------------------------------------------------
Current TF EMA : 21 (Enabled, Overrideable) : On 15m chart = 5.25 hours—perfectly captures Gold's average intraday move length. Can be overridden by Pin Bar + Engulfing Combo to catch institutional reversals that occur against the short-term trend.
-----------------------------------------------------------------------------------------
Higher TF EMA : 150 on 1H : On Gold, a 150-period EMA on a 1H chart represents roughly 6.5 days (one full trading week) of data. By making this filter absolute, the strategy guarantees it will never take a counter-trend trade against the weekly macro-structure.trend.
-----------------------------------------------------------------------------------------
Filter (RSI) : length 12 : Most traders default to RSI(14), but RSI(12) is intentionally faster for Gold's volatile intraday moves. Gold often spikes into overbought/oversold territory and reverses quickly. A 12-period RSI reacts ~15% faster than RSI(14), catching these reversals earlier while remaining smooth enough to avoid excessive whipsaws.
-----------------------------------------------------------------------------------------
Filter (Bollinger Bands) : Disabled by default : Gold is historically a trending asset with strong directional moves. A low-volatility filter would unnecessarily block valid entries during these trends. Designed for range-bound assets (choppy crypto, certain forex crosses)—enable it only if your market consolidates heavily.
-----------------------------------------------------------------------------------------
These values are a starting point – you may adjust them for other assets or personal risk tolerance.
# Important Notes on Backtest Realism
- Commission – Most ECN/raw-spread brokers charge $3.00–$3.50 per side (round-turn commission of $6.00- $7.00) for 1 standard lot (100 oz) of XAUUSD. Standard accounts usually build the fee into a wider spread instead of charging a separate cash. This strategy deducts $3.50 per entry and $3.50 per exit ($0.035 × 100 oz)round-turn commission of $7.00. Adjust this to match your broker's exact fees.
- 4 ticks Slippage - For XAUUSD, 1 tick = $0.01 per ounce. 4 ticks = **$0.04 per ounce (unit)**. Accounts for real-world price . Prevents overly optimistic backtest equity curves.
Always adjust the commission value to your broker's exact fee structure before relying on the results.
"A backtest without realistic commission and slippage is a fantasy. A backtest with realistic commission and slippage is a truthful reflection of what you can expect when trading live."
- Intra-Bar Execution: The strategy uses calc_on_every_tick = true, meaning it recalculates on every price tick during real-time trading. This allows the breakeven and partial TP logic to trigger immediately when price hits TP1, protecting the trade from intra-bar reversals.
Note: Backtests use OHLC data only, so intra-bar fills and breakeven triggers cannot be perfectly simulated. Real-time performance may differ from backtest results due to this limitation
# The Core Innovation (Why This Isn't Just a Mashup)
This strategy is built on a three-layer validation system. Each layer solves a specific problem that the other layers cannot solve alone.
Layer 1 (The Structure): Dynamic Pivot Zones
Layer 2 (The Trigger): Pin-Bar Sweep + Engulfing Combo
Layer 3 (The Execution): Gap State Machine
Here is how they interdepend to create a unique edge:
1. Adaptive Pivot Mathematics (The "Regime Matching" Logic)
Instead of offering multiple pivot types just for the sake of it, this strategy provides them so the trader can match the mathematical formula to the market's current behavioral regime:
Why this matters: Most strategies lock you into one formula. This strategy acknowledges that price dynamics change, and it gives you the mathematical weapon to adapt without rewriting the entire code.
2. The "Liquidity Grab" Trigger (Sweep + Engulfing Combo)
This is the most critical edge of the strategy. A standard Engulfing pattern is common. A standard Pin Bar is common. But when they occur sequentially—a Pin Bar that sweeps the 12-bar extreme, immediately followed by an Engulfing candle—it represents a textbook institutional "liquidity grab."
- The Logic: Large players often push price to sweep obvious stop-losses (above highs or below lows) before reversing the trend.
- The Override: Crucially, this specific combo overrides the Lower TF EMA confirmation.
- Why this is a breakthrough: Standard trend-following strategies with a hard EMA filter will miss these reversals because price is moving against the EMA in the short term. By programming this specific override, the strategy captures the exact moment of institutional reversal—catching the move before the EMA flips and the trend-followers finally enter.
3. The Gap State Machine (Dynamic Sentiment Tracking)
Unlike static support/resistance scripts that just plot lines and wait for touches, this strategy features a state machine that tracks which of the 9 gaps (between R4-R1, Pivot, S1-S4) the price currently occupies.
- The Mechanism: A Breakout Threshold (default 7% of zone width) acts as a "dead-zone" filter. Price must exceed this threshold to officially transition from one gap to another.
- The Alpha: This prevents the strategy from whipsawing during minor noise. When price crosses from Gap 4 (between R1 and Pivot) into Gap 3 (between R2 and R1), the strategy instantly and autonomously switches market status from "Bearish" to "Bullish" or vice versa.
4. Selective Zone Activation (Strategic Discretion)
- This strategy allows the user to completely disable specific zones (e.g., turn off R3).
- The Value: By disabling a weak level, the user forces the strategy to wait for the next stronger level, instantly increasing the win rate and filtering out historically weak signals without altering any other code.
5. Non-Invasive Risk Architecture (Clean Defaults)
For traders who want to reduce psychological pressure or optimize for Gold's notorious retracements, they can enable these modules. When activated, the strategy closes % of the position at a lower R:R threshold and moves the remaining position to breakeven—locking in profits while letting the rest run.
In Summary: The "Mashup" Justification
This is not a random collection of indicators.
1. The State Machine provides the structural context.
2. The Pin+Engulf combo provides the high-conviction trigger that overrides slow-moving filters.
3. The Selectable Pivot Types provide the mathematical adaptability to different assets.
4. The Selectable Zones provide the manual discretion to avoid historical losing levels.
5. The Disabled TP/BE by default provides a clean baseline for evaluating the core logic.
Author: Awab_Hassan
Strategy

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. Indicator

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. Indicator

Indicator

Standing Wave Phase Coherence [JOAT]STANDING WAVE PHASE COHERENCE
A phase-coherence engine that asks a question almost no public indicator can answer: are the LTF and HTF oscillators in phase or out of phase ? Two oscillators that move together (peaks and troughs aligned) form a standing wave — a state of constructive interference where the trend is amplified. Two oscillators that move opposite (peaks aligned with troughs) form an anti-standing wave — a state of destructive interference where a reversal is forming. Standing Wave Phase Coherence measures phase, computes the coherence between the two timeframes, and surfaces a single number bounded in that tells you which regime you are in.
Phase, not just direction
A moving average tells you "where price is sitting". A momentum oscillator tells you "which way it is moving". Phase is the location inside the cycle — are we approaching a peak, leaving a peak, approaching a trough, leaving a trough? Two oscillators on different timeframes can be:
In phase — both rising or both falling at the same rate of cycle progression. Constructive interference. Trend amplifies.
Anti-phase — one rising, the other falling at the same cycle rate. Destructive interference. Reversal forms.
Decoherent — phases are uncorrelated. The wave structure is breaking down. No directional edge from coherence.
The script estimates phase from each timeframe's RSI series (both legs at the same RSI length for fair comparison), differences the phase smoothly, then takes the cosine of the phase difference — which is exactly the quantum-mechanical coherence metric on a scale.
Non-repainting HTF construction
The HTF leg uses request.security with lookahead_on AND a offset on the expression — the only non-repainting form per Pine v6 docs. This is exposed as a toggle but ON by default; the warning in the input tooltip explains the trade-off (turn off only for research, never live).
Three thresholds, three states
Coherence > +0.70 (configurable) — IN PHASE . Standing wave constructive. Trend amplifies. Bull-palette background tint.
Coherence < −0.70 — ANTI PHASE . Standing wave destructive. Reversal forms. Bear-palette background tint.
|Coherence| < 0.30 (decoherent band) — DECOHERENT . No standing wave. Mid-palette neutral.
In between — transitional.
Phase-status arrows print inside the pane at every regime entry, so the chart history shows when each standing wave formed and collapsed.
Visual system
Coherence line with configurable width.
Glow halo — a wider semi-transparent copy of the coherence line below the main line, creating a soft glow effect.
Background tint by phase status — bull when IN PHASE, bear when ANTI PHASE, none when decoherent. Transparency configurable.
Threshold lines at ±0.70 (toggleable).
Zero line .
Fill between threshold and ±1 — soft bull / bear fill highlights the active phase zone so it is immediately obvious which side is engaged.
Phase status arrows inside the pane on state transitions.
The pane uses the JOAT default palette (cyan-teal bull / magenta bear).
Amplification factor
A separate EMA-smoothed trend amplification factor is computed from the coherence and surfaced in the dashboard. When coherence is sustained high (in-phase), the amplification factor rises — quantifying how much the LTF/HTF agreement is reinforcing the move. Useful as a position-sizing input: bigger amplification = stronger conviction = larger size.
Dashboard
Monospaced table, positionable to any of nine corners. Surfaces:
Current coherence value and bar age.
Phase status (IN PHASE / ANTI PHASE / DECOHERENT) with glyph.
LTF and HTF RSI values.
Phase difference in radians and degrees.
Trend amplification factor (smoothed).
HTF timeframe in use with non-repaint flag.
Alerts
Multiple alert conditions:
Coherence crosses above +0.70 (IN PHASE entry)
Coherence crosses below −0.70 (ANTI PHASE entry)
Coherence returns to decoherent band
Sustained IN PHASE (held above threshold for N bars)
Sustained ANTI PHASE
How to read it
Three reads, in order of conviction:
Sustained IN PHASE — the highest-conviction trend read. LTF and HTF oscillators are decisively moving together. This is the regime in which momentum tools have their largest edge.
Entry into ANTI PHASE — the reversal warning. The two timeframes have rotated opposite each other; whichever direction LTF is moving, HTF is opposing. Often precedes meaningful reversals.
Decoherent zone — stand-aside signal. The wave structure has broken down. Coherence-based reads are not actionable; switch to a regime-classification tool (FDI, Hurst, Entropy).
The cleanest workflow: only take trend trades when IN PHASE; only take reversal trades when ANTI PHASE; do nothing when DECOHERENT.
Suggested settings
Defaults (RSI 14, HTF 4H, phase smoothing 3, coherence smoothing 8, ±0.70 thresholds, ±0.30 decoherent band) are tuned for 15m–1H charts. The HTF should always be greater than or equal to the chart timeframe; mismatching produces meaningless phase reads. For HTF (4H+ chart timeframes) raise HTF to Daily and consider the LTF/HTF coherence as a daily-vs-weekly read.
Originality
The implementation — the dual-timeframe RSI phase estimator, the smoothed phase-difference cosine coherence (quantum-style metric), the non-repainting HTF request with -offset + lookahead_on pattern, the three-threshold phase classifier with decoherent band, the trend amplification factor formulation, the glow-halo line render, and the pane-overlay phase-status arrows — is JOAT-original. No third-party code reused. The notion of phase coherence between timeframes as a market regime metric is the original quantitative contribution, borrowed conceptually from optical and quantum physics.
Limitations
Phase estimation from discrete bar data is inherently noisy on short windows; the smoothing inputs (phase EMA and coherence EMA) exist to address that — over-smoothing destroys phase information, so the defaults are intentionally light. The HTF request is non-repainting in the useStrictHtf = ON configuration; do not turn it off in live trading. The decoherent band is a heuristic to avoid acting on noise reads; widen it on instruments with naturally choppy oscillator structure.
—
-made with passion by jackofalltrades
Indicator

Indicator

BreakoutBreakout is an overlay indicator for identifying pre-breakout trade context using supply/demand zones, higher-timeframe alignment, moving-average structure, and confluence scoring.
This script is for analysis and planning only. It does not place orders or guarantee results.
What it does
Breakout helps visualize potential long and short setups before price breaks out of a key zone. It combines:
- Key magnet supply/demand zones (strongest reaction levels only)
- HTF trade zones auto-anchored by chart timeframe
- Pre-trade setup boxes with entry, stop, and target
- Diamond markers for high-confluence turning points
- Liquidity levels for potential sweep/SFP context
- Optional info panel with bias, levels, and active setup details
How it works
Magnet zones: pivot highs/lows cluster into levels. Levels price revisits gain strength. Only the strongest are drawn.
HTF trade regime: each chart timeframe uses two higher anchor timeframes. Long ideas can be filtered to HTF demand zones; shorts to HTF supply zones. Zones use confirmed HTF swing highs/lows with ATR-based width and reach.
Setup engine: setups form when zone context, trend/MA structure, confidence score, and cooldown align. Stops use risk percent, MA support/resistance, swing levels, and a max distance cap. Targets use a configurable minimum risk/reward.
Diamond signals: require structure (SFP, reversal, or MA setup), zone context, and supporting momentum/trend. Optional volume spike and RSI divergence add confluence. Not every pivot prints a diamond.
Volume and divergence: abnormal volume spikes (relative volume and z-score) can combine with RSI divergence in diamonds and setup scoring.
MTF data uses request.security() with barmerge.lookahead_off to avoid lookahead on higher-timeframe context.
How to use
1. Add Breakout to your chart.
2. Choose your execution timeframe.
3. Keep HTF zone filter on for higher-timeframe alignment.
4. Wait for price at HTF zone plus key magnet zone, then diamond or setup box with confidence at or above Min Confidence.
5. Use entry, stop, and target from the active setup box for planning.
6. Manage risk with your own rules.
Main settings
- Risk: risk per trade, min R/R, max hold bars
- Filters: min confidence, approach distance, cooldown, volume, vol spike and divergence
- HTF zones: trade inside HTF S/D only, auto anchors, zone width and reach
- Display: zones, setups, liquidity, labels, info panel, EMAs, diamond spacing
Alerts
- Breakout Long Setup
- Breakout Short Setup
- Breakout Approaching Demand
- Breakout Approaching Supply
Alerts reflect script conditions at alert time. They are not trade recommendations.
Disclaimer
Educational and informational use only. Not financial advice. Trading involves risk, including loss of capital. Past results do not guarantee future performance. Use at your own discretion. Indicator

Indicator

Multi MA Framework [Gabremoku]Multi MA Framework is a flexible multi-moving-average overlay built for traders who want a clean and fully customizable MA workspace directly on the chart.
The indicator lets you plot up to four independent moving averages, each with its own:
visibility toggle
length
MA type
color
This makes it useful for traders who want to combine fast and slow averages, compare SMA vs EMA behavior, or build a personalized trend framework without loading multiple separate indicators.
What it shows
📈 Up to 4 Moving Averages — each line can be configured independently and displayed only when needed.
⚙️ SMA or EMA per line — choose the moving average type separately for each MA. SMA gives equal weight to all values in the period, while EMA gives more weight to recent prices and typically reacts faster to change.
🏷️ End Labels — optional right-side labels show each MA name, type, and length.
☁️ Cloud Fills — optional fills between:
MA 1 / MA 2
MA 3 / MA 4
These clouds help visualize alignment and separation between faster and slower averages.
Core idea
This script is designed as a moving average framework, not a rigid strategy.
Moving averages are commonly used to:
identify trend direction
smooth noisy price action
monitor dynamic support and resistance
compare short-term and long-term market structure
By allowing different lengths and SMA/EMA choices on every line, the script makes it easy to create your own structure, for example:
fast trend stack
swing trend map
long-term bias model
crossover-based workflow
How to use
A practical way to use the framework is to combine shorter and longer averages.
For example:
a shorter MA can track immediate momentum
a medium MA can define swing direction
a longer MA can define higher-level trend bias
When multiple moving averages align in the same direction, traders often interpret that as stronger trend structure. Crossovers between faster and slower averages are also widely used to monitor possible trend shifts, although they are lagging by nature.
Example setups
Here are some common ways this framework can be configured:
Trend stack: 10 EMA / 20 EMA / 50 EMA / 200 SMA
Swing trader view: 20 EMA / 50 SMA / 100 SMA / 200 SMA
Minimal structure: show only 2 lines and enable one cloud
Cross comparison: use SMA on one line and EMA on another with the same or similar length to compare responsiveness
Because EMA reacts faster and SMA is smoother, combining both can help balance responsiveness and stability.
Features
✅ Up to 4 fully independent moving averages
✅ SMA or EMA selection for each line
✅ Custom length for each MA
✅ Custom color for each MA
✅ Visibility toggle for every line
✅ Adjustable line width
✅ Optional right-side end labels
✅ Optional MA1/MA2 cloud fill
✅ Optional MA3/MA4 cloud fill
✅ Clean chart overlay design
Notes
This indicator is best used as a custom trend structure tool rather than a standalone signal engine. Moving averages are inherently lagging indicators, so they are most effective when used to define context and trend bias rather than predict reversals on their own.
Author: Gabremoku
Pine Script v6 Indicator

EMA's [Ordinary Trader]EMAs by Plots two parallel stacks of three EMAs — one anchored to a Higher Timeframe of your choice, one following the chart's current timeframe. Built around the Ordinary Trader methodology, where the 15-minute 50 / 100 / 300 EMA stack acts as a higher-timeframe directional filter while trading on lower timeframes.
**WHAT YOU SEE ON THE CHART**
Six EMAs total, split into two groups:
- **HTF EMAs** — three EMAs locked to a higher timeframe of your choice (default 15-minute). They stay anchored to 15-minute data even when you drop the chart to 1m, 3m, or 5m. Drawn as **thick** lines.
- **LTF EMAs** — three EMAs that follow the chart's current timeframe (or any specific lower timeframe you pin them to). Drawn as **thin** lines.
Same colour for the same EMA length across both groups: 50 = sage green, 100 = terracotta orange, 300 = purple-grey. Thickness tells you which timeframe you're looking at; colour tells you which EMA length.
**HOW TO USE IT**
The default setup is the Ordinary Trader 15-minute filter: HTF set to 15-minute, LTF following the chart. Pull up a 1m, 3m, or 5m chart and you'll see both groups at once — the thick lines are your 15-minute anchor, the thin lines are your chart-timeframe stack for entries.
By default the 50 and 100 EMAs are on in both groups; the 300 EMA is off but available. Flip it on in the Settings panel if you want the full stack.
**AUTO-HIDE FOR THE LTF GROUP**
When your chart timeframe is equal to or higher than the HTF timeframe, the LTF group hides automatically. So on a 15-minute chart (with HTF still at 15-minute) only the HTF group shows — no point drawing the LTF stack on top of an identical HTF stack. Same on the 1-hour, daily, or higher.
**VISUAL SMOOTHING**
When a higher-timeframe EMA is plotted on a lower-timeframe chart, it naturally looks stepped — each new HTF bar updates the EMA in one chunk, so the line moves in jumps rather than smoothly. The Visual Smoothing option (on by default) applies a light smoothing pass so the line reads cleanly on lower-timeframe charts. It trades a tiny amount of lag for a cleaner look — turn it off if you'd rather see the raw, stepped HTF values.
**SETTINGS**
- **General** — LTF Timeframe, HTF Timeframe, Plot Style (Line / Stepline), Visual Smoothing on/off + length
- **HTF EMAs** — toggle, length, and price source for each of the three HTF EMAs
- **LTF EMAs** — toggle, length, and price source for each of the three LTF EMAs
**NOTES**
- Pairs naturally with the other Ordinary Trader-family indicators (STRATEGY, ZONES, KEY LEVELS, FVGs). Indicator

[ A L P H A X ] Pulse ScalperAlphaX Pulse Scalper — 4-Layer Confluence Scalping System with ATR Trailing Exits, Squeeze Momentum Detection & Live Scoring Dashboard
AlphaX Pulse Scalper is a professional-grade multi-confluence scalping system engineered to fire only when four independent technical engines simultaneously agree on direction. Unlike single-indicator systems that generate signals from one source of information, Pulse Scalper runs a live scoring gate across an EMA Ribbon, a Squeeze Momentum engine, a Volume Delta pressure model, and a VWAP Deviation filter — every bar, on every candle. A signal only reaches your chart when at least three of the four layers confirm. The result is a dramatically lower signal count with a dramatically higher average quality per signal. Designed for active scalpers on crypto, forex, gold, and indices across the 1-minute to 15-minute timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The 4-Layer Confluence Engine — How It Works
Most scalping indicators fire from a single calculation — a crossover, a threshold breach, a momentum flip. The problem is that any single calculation is easily fooled by noise, spikes, and choppy price action. AlphaX Pulse Scalper is built on a fundamentally different architecture: four completely independent layers, each measuring a different dimension of market behavior , each casting a vote on every bar. Only when enough votes align does a signal fire.
This is not a filter applied on top of a signal. The confluence is the signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Layer 1 — EMA Ribbon (Trend Structure)
The first layer is a triple EMA ribbon using a Fast EMA (default: 8), Slow EMA (default: 21), and Signal EMA (default: 50). This layer answers a single question: is the market in a clean, structured trend right now?
Bull condition: Fast EMA above Slow EMA, Slow EMA above Signal EMA, and price closing above all three — a full stack alignment confirming upward momentum structure.
Bear condition: The full inverse — Fast below Slow below Signal, with price below all three.
Why this matters: The ribbon does not react to a single crossover. All three EMAs must be stacked in order and price must be on the correct side. This eliminates the vast majority of false crossover signals that plague simple dual-EMA systems. The ribbon is also plotted directly on the chart as a gradient-filled channel — bull fills in yellow-green, bear fills in red — giving you immediate structural context at a glance.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Layer 2 — Squeeze Momentum (Energy Detection)
The second layer is built on the TTM Squeeze principle — one of the most reliable pre-breakout detection systems in technical analysis. It works by measuring the relationship between two volatility envelopes: Bollinger Bands and Keltner Channels.
Squeeze state: When the Bollinger Bands compress inside the Keltner Channels, the market is coiling — volatility has contracted and energy is building. These periods of compression historically precede the strongest directional moves. The squeeze state is displayed as a subtle orange background tint on the chart, and flagged on the dashboard as ⚡ BUILDING — giving you advance warning that a breakout is loading before it happens.
Momentum direction: The raw momentum value is calculated using a linear regression of price position relative to the midpoint of the recent high-low range. When this value is positive and rising , the squeeze is releasing to the upside. When negative and falling , it is releasing to the downside.
Layer 2 votes bull when: Momentum value is above zero and accelerating upward.
Layer 2 votes bear when: Momentum value is below zero and accelerating downward.
Why this matters: This layer catches the energy behind a move, not just the direction. A breakout with strong squeeze momentum behind it is fundamentally different from a breakout on low momentum — and this layer distinguishes between the two on every bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Layer 3 — Volume Delta (Institutional Pressure)
The third layer is a proprietary volume delta model that estimates the real buying and selling pressure behind each candle — without requiring exchange-level order flow data.
How it works: Each candle's volume is split into bullish and bearish components based on the candle's close position within its high-low range. A candle closing near its high attributes most of its volume to buyers; a candle closing near its low attributes most to sellers. These estimates are smoothed using an EMA to eliminate single-bar noise. A secondary OBV slope (On-Balance Volume) is calculated over the configured lookback and used as an independent confirmation of the dominant pressure direction.
Layer 3 votes bull when: The bull volume EMA exceeds the bear volume EMA, the delta EMA is positive, and the OBV slope is rising — all three volume signals agree on buying pressure.
Layer 3 votes bear when: The full inverse — bear volume dominates, delta EMA is negative, OBV slope is falling.
Why this matters: Price can move in any direction on any bar. Volume delta tells you whether real capital is flowing in the direction of that move. A price breakout accompanied by genuine volume pressure is a high-confidence breakout. A price breakout on weak or opposing volume is a trap. This layer is the system's protection against price manipulation and false breakouts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 Layer 4 — VWAP Deviation (Institutional Bias)
The fourth layer uses the Volume Weighted Average Price (VWAP) with dynamically calculated standard deviation bands to identify where price stands relative to institutional value.
Band structure: Two band pairs are calculated — ±1σ and ±2σ — using a volume-weighted standard deviation formula applied across the session. These bands represent statistically significant deviations from the session's fair value anchor.
Layer 4 votes bull when: Price is above VWAP (institutional bias is bullish) but has not yet extended beyond the +2σ band — confirming trend direction without chasing a stretched, overextended move.
Layer 4 votes bear when: Price is below VWAP but has not extended beyond the -2σ band.
Why this matters: VWAP is the single most widely watched intraday reference level used by institutional desks, market makers, and algorithms. Price above VWAP means institutions are net buyers for the session. Price below means net sellers. The 2σ filter prevents the system from entering during climactic exhaustion moves — precisely the moments when reversal risk is highest and reward is lowest.
The bands are plotted directly on the chart — VWAP as a purple line, ±1σ as dotted yellow-green and red circles, ±2σ as solid outer boundaries — so you always have the full VWAP context visible alongside your signals.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The Confluence Gate — Live Scoring System
On every bar, each of the four layers independently casts its vote. The results are tallied into a live confluence score displayed in real time on the dashboard.
Bull score: 0–4 points. One point for each layer voting bullish.
Bear score: 0–4 points. One point for each layer voting bearish.
Signal fires when: The score meets or exceeds the configured minimum (default: 3 of 4), the ADX filter confirms a trending market, and the session filter confirms active market hours.
Score thresholds and what they mean:
4 / 4 — maximum confluence. All four independent engines agree. The highest-conviction setup the system can produce. Enter full size.
3 / 4 — strong confluence. Three of four layers aligned. The default threshold — high quality with reasonable frequency.
2 / 4 — weak confluence. Available if you lower the minimum, but not recommended. Two engines agreeing is not meaningful convergence.
The confluence score is printed directly on the signal label (e.g., 3/4 or 4/4 ) so you know at a glance exactly how strong every setup is at the moment it fires. The dashboard continuously displays the live bull and bear scores — even between signals — so you can watch confidence building in real time before the signal appears.
Edge triggering: Signals only fire on the bar where the score first crosses the threshold — not on every bar the score remains above it. This prevents signal spam during extended trend runs and ensures every triangle on the chart represents a distinct, fresh entry event.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 ADX Filter — Trend Quality Gate
Before any signal reaches the chart, it must also pass the ADX (Average Directional Index) filter . ADX measures the strength of the current trend regardless of direction — a reading below the threshold indicates a choppy, ranging market where trend-following signals have low reliability.
Default threshold: 20. When ADX is below this level, all signals are suppressed — even if the confluence score is 4/4. This is the system's protection against the single most common failure mode of scalping indicators: firing confidently into sideways, oscillating price action.
The ADX value and pass/fail status are displayed live on the dashboard so you always know whether the market structure supports trading at any given moment.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕐 Session Filter — Active Hours Gate
The Session Filter restricts signals to a configurable active trading window (default: 07:00–20:00 exchange time). Outside this window, signals are suppressed regardless of confluence score.
Why this matters for scalpers: Low-volume pre-market and post-market hours produce the most misleading signals of any period. Spreads widen, liquidity thins, and momentum moves that look compelling on the chart are frequently reversed the moment the main session opens. The session filter eliminates this entire class of false setups automatically.
The dashboard displays a clear ✓ ACTIVE or ✗ OFF-HOURS status so you always know whether the filter is open or closed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Dynamic ATR Exit System
AlphaX Pulse Scalper uses a fully dynamic ATR-based exit system with three simultaneously active exit mechanisms — each serving a distinct role in protecting profit.
Stop Loss: Fixed at entry based on the pivot low (bull) or pivot high (bear) minus an ATR buffer (default: 1.2× ATR). Displayed as a solid red line below price for longs, above for shorts. This is your maximum risk boundary — it does not move.
TP1 — Partial Target (50%): Set at 1.8× ATR from entry. When price reaches TP1, scale out 50% of the position and let the remainder run to TP2. A small circle marker appears at the TP1 bar.
TP2 — Full Target: Set at 3.5× ATR from entry. When price reaches TP2, the full position exits and the system resets. A labeled TP marker appears on the chart.
ATR Trailing Stop: The most important of the three. From the moment a trade opens, a trailing stop moves dynamically with price — always positioned 1.5× ATR behind the current bar's low (for longs) or high (for shorts). The trail is displayed as a live orange line on the chart. As price advances in your favor, the trail advances with it. If price reverses and hits the trail before reaching TP2, the trade exits at the trail level rather than waiting to give back all gains.
Why the trailing stop changes everything: Fixed TP levels work in textbook trends. In the real market, strong impulses often exceed TP2 before reversing — and weak impulses stall before even reaching TP1. The ATR trailing stop captures whatever the market gives, without predetermining a ceiling on your profit. In strong trending conditions, a single Pulse Scalper signal with an active trail can run 5–10× ATR before stopping out.
All three exit levels — SL, TP1, TP2, and the trailing stop — are plotted as live lines on the chart as long as a trade is active, then cleared automatically when the position closes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The real-time dashboard displays the complete internal state of the indicator across four sections, updated on every bar.
MARKET
Session — ✓ ACTIVE or ✗ OFF-HOURS. Confirms whether the session filter is open for signals
ADX — live ADX value with ✓ or ✗ pass/fail indicator. Confirms whether market structure is trending strongly enough to trade
CONFLUENCE
L1 EMA Ribbon — current ribbon state: ▲ BULL, ▼ BEAR, or — FLAT
L2 Squeeze Momentum — current momentum state: ⚡ SQUEEZE (building), ▲ BULL, ▼ BEAR, or — FLAT. The squeeze state is the highest-value pre-signal condition the system can display
L3 Volume Delta — current volume pressure: ▲ BULL, ▼ BEAR, or — NEUTRAL
L4 VWAP Deviation — current VWAP position: ▲ ABOVE, ▼ BELOW, or — EXTENDED (price beyond 2σ, filter active)
Bull Score — live 0–4 score for bullish confluence. Background turns yellow-green when threshold is met — the signal is ready to fire
Bear Score — live 0–4 score for bearish confluence. Background turns red when threshold is met
POSITION
Position — current tracked position: ▲ LONG, ▼ SHORT, or — FLAT with background color highlight
Stop Loss — the fixed SL level currently active, color-coded red (bull) or green (bear)
Trail Stop — the current trailing stop level in orange — updates dynamically every bar the trade is open
TP1 (50%) — the first take-profit target currently active
TP2 (full) — the full exit target currently active
Bars in Trade — how many bars the current position has been open
INFO
ATR — current ATR value used for all exit calculations
VWAP — current VWAP price level for the session
Squeeze — ⚡ BUILDING when BB is inside KC (squeeze active), or — RELEASED when the squeeze has fired
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Every visual element on the chart serves a specific purpose. There is no decorative clutter.
▲ Triangle (below bar) — bull entry signal. Fires when bull confluence score meets threshold, ADX passes, session is active
▼ Triangle (above bar) — bear entry signal. Fires when bear confluence score meets threshold
Score Label (3/4 or 4/4) — printed beside each signal triangle. The raw confluence count at signal time
EMA Ribbon Fill — yellow-green fill between Fast and Slow EMA during bull structure, red during bear structure. Collapses to gray during neutral
VWAP Line — purple center line marking the session's volume-weighted fair value
VWAP ±1σ Bands — dotted yellow-green and red circles marking the first standard deviation
VWAP ±2σ Bands — solid outer boundaries. Price touching these is the maximum extension zone
Orange Squeeze Background — appears during active squeeze conditions. A visual alert that energy is compressing and a breakout is approaching
Yellow-green background tint — active during open long trades. Confirms trade is live at a glance
Red background tint — active during open short trades
SL Line (red/green) — the fixed stop loss level, active while trade is open
TP1 Line (semi-transparent) — the partial target level
TP2 Line (bright) — the full exit target level
Trail Line (orange) — the dynamic trailing stop, moves with price every bar
TP marker — appears when TP2 is hit. Full exit confirmed
SL marker — appears when stop loss or trailing stop is triggered
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Pulse Scalper — Step by Step
Step 1 — Check the Dashboard Before Every Session
Confirm Session shows ✓ ACTIVE
Confirm ADX shows ✓ — if ADX is below threshold, the market is ranging and no signals will fire regardless of how the layers look
Watch the Squeeze row on the dashboard — ⚡ BUILDING means a breakout setup is forming. This is your highest-alert pre-signal state
Step 2 — Watch the Confluence Scores Build
Monitor the live Bull Score and Bear Score rows in the dashboard. You can watch the scores build in real time, bar by bar, before a signal fires
When a score reaches 3/4 and the background highlights, a signal is imminent or has just fired
A 4/4 score is the highest-quality setup. Prioritize these above all else
Step 3 — Enter on the Signal Triangle
A ▲ triangle below the bar is a long signal. Enter on the close of the signal bar or the open of the next bar
A ▼ triangle above the bar is a short signal. Enter on the same basis
Read the score label — 4/4 signals warrant full position size, 3/4 signals warrant standard or slightly reduced size
Step 4 — Manage with the Live Exit Lines
The SL line is your hard stop. Never move it further away from price
Watch the orange Trail Stop line advance with price as the trade moves in your favor
At TP1, scale out 50% of the position. Move your manual stop to breakeven on the remainder
Let the trailing stop manage the rest — it will exit automatically when momentum exhausts
Step 5 — Exit and Reset
A TP marker on the chart confirms TP2 has been hit. Full exit. Dashboard resets to — FLAT
An SL marker confirms the stop or trail has been hit. Accept the loss and wait for the next setup
After any exit, do not re-enter immediately. Wait for the confluence score to rebuild from zero — this prevents revenge trading into the same noise that stopped you out
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
The system is designed to filter out most low-quality conditions automatically. But understanding what to look for gives you an additional edge.
Stand aside when you see:
ADX ✗ on the dashboard — the market is not trending. Any signal would be a range-bound trade against the system's core design
Dashboard shows — FLAT across all four layers — no layer has a directional conviction. The market has no readable bias
Bull and bear scores both at 1 or 2 — the layers are split. Price is oscillating without commitment in either direction
Session shows ✗ OFF-HOURS — no signals will fire and manual entries carry elevated risk from thin liquidity
Squeeze just released but score is only 2/4 — the squeeze fired but not enough layers confirmed the direction. This is a low-conviction breakout — wait for the next setup
Rapid alternation of ▲ and ▼ triangles — if you see signals in both directions within a short window, the market is too choppy. Increase the ADX threshold in settings or stand aside until a clearer trend develops
What to do:
Wait for the Squeeze dashboard to show ⚡ BUILDING — this is the highest-quality pre-signal state. The best Pulse Scalper setups almost always begin with a squeeze
Wait for ADX to climb back above threshold — a strong trend is forming
Wait for a 4/4 score on the next signal — maximum confluence only, no compromises in a difficult session
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔬 4-layer confluence gate — EMA Ribbon, Squeeze Momentum, Volume Delta, and VWAP Deviation must agree before any signal fires
📊 Live confluence scoring — bull and bear scores update every bar in real time, displayed on the dashboard before the signal appears
⚡ TTM Squeeze detection — Bollinger/Keltner compression identifies pre-breakout coiling with an orange background tint and dashboard flag
📈 Proprietary volume delta model — estimates buying and selling pressure without exchange-level order flow data, confirmed by OBV slope
📡 VWAP with standard deviation bands — ±1σ and ±2σ plotted live, VWAP filter prevents entries during climactic extension moves
🛡 ADX trend quality gate — suppresses all signals during choppy, non-trending market conditions
🕐 Session filter — restricts signals to active market hours, eliminating low-liquidity false setups automatically
🎯 Triple exit mechanism — fixed ATR stop loss, TP1 at 1.8× ATR, TP2 at 3.5× ATR, plus dynamic ATR trailing stop that advances with price every bar
📉 ATR trailing stop — plotted as a live orange line, adapts dynamically to volatility, captures extended runs beyond TP2 in strong trends
🏷 Confluence score label on every signal — 3/4 or 4/4 printed directly on the chart so you know signal quality at a glance
📊 28-row live dashboard — Market, Confluence, Position, and Info sections updated in real time
🔔 9 alert conditions — bull entry, bear entry, TP1/TP2 hits, stop hits, squeeze start, any exit
🎨 Cohesive dual-tone color theme — yellow-green for all bullish elements, red for all bearish elements, orange for squeeze and trail, gray for neutral
⚙ Fully configurable — all EMA periods, squeeze parameters, VWAP multipliers, ADX threshold, confluence minimum, ATR multipliers, session window, and all colors are adjustable from the settings panel
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
EMA Ribbon
Fast EMA — the fastest ribbon line, reacts most immediately to price (default: 8)
Slow EMA — the intermediate ribbon line (default: 21)
Signal EMA — the macro trend anchor. All three must stack in order for a ribbon vote (default: 50)
Show EMA Ribbon — toggle the ribbon fill and lines on or off
Squeeze Momentum
BB Length — Bollinger Band lookback period for squeeze detection (default: 20)
BB Mult — Bollinger Band standard deviation multiplier (default: 2.0)
KC Length — Keltner Channel lookback period (default: 20)
KC Mult — Keltner Channel ATR multiplier (default: 1.5)
Momentum Length — linear regression period for the momentum value calculation (default: 12)
Volume Delta
Volume MA Length — EMA smoothing period for bull and bear volume estimates (default: 14)
OBV Slope Length — lookback bars for OBV slope calculation (default: 10)
VWAP
Use VWAP Filter — when enabled, Layer 4 requires price to be on the correct side of VWAP (default: on)
Show VWAP Bands — toggle ±1σ and ±2σ band plots on or off
Band 1 Mult — first standard deviation band multiplier (default: 1.0)
Band 2 Mult — second standard deviation band multiplier (default: 2.0)
Confluence Gate
Min Layers Required — how many of the 4 layers must agree for a signal to fire. 2 = more signals, 3 = balanced (default), 4 = ultra-selective
Session Filter — toggle the active hours restriction on or off
Active Session — configurable session window string (default: 0700-2000)
ADX Filter
Use ADX Filter — toggle the trend quality gate on or off
ADX Length — lookback period for ADX calculation (default: 14)
ADX Minimum — threshold below which all signals are suppressed (default: 20)
Exit Settings
ATR Length — lookback period for ATR used in all exit calculations (default: 10)
SL ATR Mult — stop loss distance from entry as a multiple of ATR (default: 1.2)
TP1 ATR Mult — first take-profit distance (default: 1.8 — approximately 1.5:1 reward on a full position)
TP2 ATR Mult — full exit target distance (default: 3.5 — approximately 3:1 reward)
Use ATR Trailing Stop — toggle the dynamic trailing stop mechanism on or off
Trail ATR Mult — trailing stop distance from current bar's low or high (default: 1.5)
Show Exit Levels — toggle SL, TP1, TP2, and trail lines on the chart
Display
Show Confluence Score Label — prints the live score (e.g. 3/4) on every signal triangle
Show Dashboard — toggle the entire dashboard panel on or off
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for all bullish signals, fills, and labels
Bear / Bear Bright — red family for all bearish signals, fills, and labels
Squeeze — orange used for squeeze background tint and trailing stop line
Neutral — gray for inactive states and neutral dashboard rows
Text Light / Dash BG — dashboard typography and background
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (9 total)
Entry Alerts
Bull Confluence Entry — bull score meets threshold, ADX passes, session active
Bear Confluence Entry — bear score meets threshold, ADX passes, session active
Exit Alerts
Bull TP1 Hit — price reaches the first bull take-profit level
Bull TP2 Hit — price reaches the full bull exit target
Bull Stop Hit — stop loss or trailing stop triggered on a long position
Bear TP1 Hit — price reaches the first bear take-profit level
Bear TP2 Hit — price reaches the full bear exit target
Bear Stop Hit — stop loss or trailing stop triggered on a short position
Special State Alerts
Squeeze Started — Bollinger Bands have compressed inside Keltner Channels. A breakout setup is loading
All alert messages include {{ticker}} and {{interval}} for clean webhook and notification integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M1–M5 :
Min Layers at 3/4 — strong confluence without requiring perfection on every bar
ADX minimum at 20 — filters choppy intraday sessions without being overly restrictive
ATR Trail at 1.5× — gives trades enough room to breathe on fast-moving scalping timeframes
Session 07:00–20:00 — covers London and New York sessions, the highest-volume windows for forex and gold
For other instruments or timeframes, adjust:
Higher timeframes (M15, H1, H4) — increase EMA periods (Fast 13, Slow 34, Signal 89), increase ADX minimum to 25, increase TP2 to 4.5–5.0× ATR
Crypto (BTC, ETH) — increase KC Mult to 2.0–2.5 to accommodate wider volatility, increase SL mult to 1.5–2.0
Indices (NAS100, US30, SPX500) — use defaults with ADX raised to 22–25. Index trends are strong but session timing is critical — tighten session window to 09:30–16:00 for US indices
More signals — lower Min Layers to 2, disable ADX filter, widen session window
Fewer, higher-quality signals — raise Min Layers to 4, raise ADX minimum to 25, enable volume filter with ratio at 1.2×
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
⚡ Scalpers and intraday momentum traders — the 1m–15m timeframe focus and ATR trailing exit system are built specifically for fast-moving intraday conditions
🥇 Gold (XAUUSD) and forex traders — default settings are tuned and tested on gold and major pairs during London and New York sessions
📊 Crypto and index traders — the four-layer architecture adapts across instruments without manual recalibration
🧠 Systematic traders — the live confluence score provides a quantitative signal quality reading, not just a visual arrow
📈 Traders who want to eliminate overtrading — the confluence gate, ADX filter, session filter, and edge triggering physically prevent low-quality setups from appearing on the chart
🎯 Traders who struggle with exits — the three-layer exit system (fixed SL, scaled TP1, trailing TP2) provides a complete, rules-based exit framework that removes emotion from trade management
📉 Risk-conscious traders — every trade has a defined stop, a defined first target, and a dynamic trailing mechanism. There is no ambiguity about where you exit under any scenario
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design
The edge-triggered signal logic means each triangle on the chart represents a distinct new confluence event — the same setup does not generate repeated signals during extended runs
The trailing stop line on the chart is a real-time visual — it moves every bar the trade is open and accurately reflects the current stop level at all times
Maximum 500 labels and 500 lines are used — on very low timeframes with extended chart history, the oldest markers may be automatically removed by PulseWire's rendering limits
The Squeeze background tint is a leading indicator — it appears before signals fire, giving you time to prepare. The strongest Pulse Scalper signals frequently begin with a squeeze
The VWAP calculation resets at the start of each session. On instruments without a defined session (perpetual crypto), the VWAP anchors to the chart's visible history. For best results on crypto, use a 24-hour session string or disable the VWAP filter and use the other three layers
The Trade Status section on the dashboard tracks position direction from signal to exit within a single chart session — it does not connect to your broker or brokerage account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for scalpers who need more than a signal — a complete system that scores, filters, enters, trails, and exits with precision on every trade. Indicator

Moving Average MTF**Moving Average MTF (Multi-Timeframe)**
This indicator plots three fully customizable moving averages, each calculated from an independent timeframe of your choice. Instead of being limited to the timeframe of your chart, each MA pulls data directly from its assigned timeframe — giving you a layered view of trend across multiple time horizons simultaneously.
By default the three MAs are set to 15 minutes, 1 hour, and 4 hours, all using a 50-period SMA. This makes the indicator best suited for use on a 5-minute chart, where all three timeframes sit above your chart and give you a clear short, medium, and macro trend stack in a single view.
---
**Settings**
Each of the three MAs has its own independent group of controls:
- **Show MA** — Toggles the MA line on or off without removing it from the settings.
- **Show Label** — Toggles the end-of-line label that appears to the right of the last candle. The label displays the MA type, length, timeframe, and current value.
- **Length** — The number of candles used to calculate the MA, based on its assigned timeframe. Default is 50 for all three.
- **Timeframe** — The timeframe the MA is calculated from, regardless of what timeframe your chart is on. You can type any valid timeframe directly into this field.
- **Type** — The moving average algorithm. Choose from SMA, EMA, WMA, VWMA, RMA, or HMA.
- **Line Style** — Choose between Solid, Stepline, or Circles.
- **Line Thickness** — Controls the width of the line from 1 to 10.
- **Color** — Full color picker to set each MA to any color you prefer.
---
**How to Use**
Keep your chart timeframe at or below the lowest MA timeframe you have set. With the defaults of 15min, 1h, and 4h, running the indicator on a 5-minute chart gives you the most meaningful read. When all three MAs are stacked and sloping in the same direction, trend is aligned across all three timeframes — the highest conviction environment for a trade. When they are tangled or conflicting, the market is in an indecisive state and it is generally best to wait for clarity.
---
**Important Note**
If your chart timeframe is higher than any of the MA timeframes you have set, that MA will still display but the value will not be meaningful. The indicator will not produce errors — it is purely a logical consideration. Always ensure your chart timeframe sits below your lowest MA timeframe for accurate results. Indicator

Moving Average XLMoving Average XL is a customizable multi-moving-average overlay that allows traders to plot up to three separate moving averages on the chart at the same time. Each moving average can be independently enabled, adjusted, styled, and color-coded, making it useful for trend direction, dynamic support and resistance, crossover analysis, and multi-timeframe-style trend context.
Each MA group includes the same core settings. “Show MA” turns that moving average on or off. “Length” controls the number of candles used in the calculation, with shorter lengths reacting faster to price and longer lengths smoothing price action more heavily. “Type” lets the user choose between SMA, EMA, WMA, VWMA, RMA, and HMA depending on how responsive or smooth they want the line to be. “Line Style” changes the visual display between solid, stepline, or circles. “Line Thickness” controls the weight of the plotted line, and “Color” lets the user customize each average for easier chart reading.
This indicator is designed for traders who want a clean, flexible moving average tool without unnecessary clutter. Use shorter averages to track near-term momentum, medium averages to define intermediate trend direction, and longer averages to identify major trend bias or high-probability support and resistance areas. Indicator

Indicator

IrishGOD PDH/PDL Zones + Pre-Market H/L + MA RibbonPDH/PDL Zones + Pre-Market H/L + MA Ribbon
A comprehensive overlay indicator for PulseWire (Pine Script v5) that combines three institutional-grade tools on a single chart: historical previous-day high/low zones drawn from full candle wicks, intraday pre-market extremes, and a fully configurable multi-timeframe moving average ribbon. Designed for intraday traders who need clean, actionable levels without switching between charts or timeframes.
Pine Script v5
Overlay
Intraday
Multi-Timeframe
Alerts Included
1
Previous Day High / Low Zones
Automatically identifies the highest and lowest candle of each prior session and draws a shaded zone that spans the full wick of that candle — from the wick tip (the session extreme) down to the candle body edge (max or min of open/close). This provides a realistically sized supply or demand zone rather than a single horizontal line, accurately representing the price range where the reversal originated. Zones are stored across up to 50 prior trading days and drawn efficiently on the last bar to avoid unnecessary repainting.
Lookback
Up to 50 previous days retained and displayed simultaneously
Zone geometry
Wick tip → candle body edge; minimum 4-tick thickness for doji candles
Extension
Most recent zone optionally extends to the right edge of the chart
Labels
PDH / PDL price labels on the latest zone; four size options
Color picker
Border width 0–4px
Adjustable opacity
Toggle on/off
2
Pre-Market High / Low
Tracks the highest high and lowest low recorded during the configurable pre-market window (default 4:00–9:30 AM Eastern Time) and draws horizontal lines at those levels the moment the regular session opens. These levels are widely watched by professional traders as the first potential support and resistance areas of the day, and are particularly relevant on gap-up or gap-down open days. All time calculations are anchored to America/New_York to handle daylight saving time correctly.
Session window
Fully configurable start hour, end hour, and end minute (24h ET)
Line style
Solid, dashed, or dotted; line width 1–4px
Extension
Lines optionally extend rightward through the rest of the session
Labels
"PM High" / "PM Low" labels with exact price values
Requires a PulseWire subscription that includes extended-hours data. Levels reset each new trading day.
3
Multi-Timeframe MA Ribbon
A ribbon of up to 8 independent moving averages rendered directly on the price chart. Each MA is fully self-contained: it has its own toggle, length, color, and — critically — its own timeframe selector. This allows a single ribbon to simultaneously display a short-term trend on the current chart timeframe alongside higher-timeframe MAs (e.g. a daily 21 EMA or a weekly 50 SMA) without opening additional chart panes. When an alternate timeframe is active, the value label automatically appends a tag for instant visual identification.
MA types available
SMA
EMA
WMA
VWMA
HMA
DEMA
TEMA
RMA
LSMA
Ribbon count
8 MAs; MAs 1–5 enabled by default (lengths 8, 13, 21, 34, 55)
Per-MA timeframe
Each MA resolves on its own timeframe via request.security(); blank = current chart
Fill
Gradient color fill between consecutive MA lines; adjustable opacity
Value labels
Live price labels pinned to the right edge; show tag for HTF MAs
Source
Configurable price source: close, open, high, low, hl2, hlc3, ohlc4, etc.
Line width
Global line width control (1–4px) applied to all active MAs
lookahead=barmerge.lookahead_off is enforced on all request.security() calls to prevent higher-timeframe data leakage into historical bars.
4
Alerts
Five built-in alert conditions, configurable from PulseWire's alert dialog:
Price enters the most recent PDH zone (within 0.1%)
Price enters the most recent PDL zone (within 0.1%)
Price enters either PDH or PDL zone
MA1 crosses above MA2 — bullish signal
MA1 crosses below MA2 — bearish signal
5
Technical notes
Compatibility
Intraday charts (1m – 4h). Requires extended-hours data for pre-market feature.
Object limits
max_boxes_count 500 · max_lines_count 500 · max_labels_count 200
Rendering
PDH/PDL boxes drawn only on barstate.islast to eliminate per-tick redraw overhead
DST handling
All session time logic uses America/New_York timezone natively Indicator

Minicharts Multi Market [Herman]Minicharts Multi Market
Minicharts Multi Market is a multi-asset visualization tool designed to display several different markets directly on a single chart using compact embedded mini charts.
Instead of switching between multiple tabs and layouts, this script allows traders to monitor intermarket behavior, relative strength, SMT relationships, and higher timeframe structure from one workspace.
The indicator is intended as a visual decision-support tool only and does not generate buy or sell signals.
Purpose
The main goal of this script is to improve chart workflow and market awareness by allowing users to:
• Monitor multiple correlated assets at the same time
• Compare futures markets such as NQ, ES, YM, RTY, CL, GC and others
• Observe relative strength and weakness across markets
• Identify potential SMT divergences between correlated instruments
• Keep higher timeframe structure visible while executing on lower timeframes
• Reduce the need to constantly switch charts during active trading sessions
This helps traders maintain better context and avoid missing important intermarket information.
How It Works
The script uses request.security() to retrieve OHLC data from multiple user-selected symbols and reconstructs them as compact mini charts displayed on the right side of the main chart.
Each mini chart functions independently and can display:
• Custom symbol
• Custom timeframe
• Optional EMA
• Optional VWAP
• Optional SMT detection
• Optional HTF Fair Value Gaps (FVG / iFVG)
The indicator does not use repainting logic for visualization purposes and is designed for structural reference and contextual analysis.
Main Features
1. Multi-Asset Minicharts
Display up to 6 different assets simultaneously.
Examples:
• NQ
• ES
• YM
• RTY
• CL
• GC
• SI
• Forex pairs
• Indices
• Any PulseWire-supported symbol
Each chart can use its own symbol and its own timeframe.
This makes the script useful for:
• Index traders
• Futures traders
• SMT traders
• Intermarket analysis
• Session-based traders
• Higher timeframe structure alignment
2. Automatic SMT Detection
The script includes optional SMT (Smart Money Technique) divergence visualization.
It automatically detects correlated comparison assets:
Examples:
• NQ ↔ ES
• ES ↔ NQ
• YM ↔ ES
• RTY ↔ ES
• GC ↔ SI
• CL ↔ RB
When pivot highs or lows diverge between assets, the script highlights these areas visually.
This feature is designed to assist traders who use SMT as confirmation, not as a standalone entry signal.
3. EMA Overlay
Each mini chart can optionally display EMA.
Settings include:
• Enable / disable EMA globally
• Enable / disable EMA per mini chart
• Custom EMA period
• Custom EMA color
This helps users quickly identify trend alignment across markets.
4. VWAP Overlay
Each mini chart can optionally display VWAP.
Settings include:
• Enable / disable VWAP globally
• Enable / disable VWAP per mini chart
• Custom VWAP color
This allows users to monitor mean reversion and institutional reference pricing across multiple instruments.
5. HTF Fair Value Gaps (FVG)
Optional HTF Fair Value Gap visualization is included.
The script detects:
• Bullish FVG
• Bearish FVG
• Inverted FVG (iFVG)
Users can choose:
• Extended mode
• Next Bar Only mode
This helps provide additional structural context on higher timeframe inefficiencies.
Settings Overview
Minicharts Assets Setup
For each mini chart:
• Enable / disable chart
• Select symbol
• Select timeframe
• Enable / disable SMT
• Enable / disable EMA
• Enable / disable VWAP
Each of the 6 mini charts can be customized independently.
EMA Configuration
• Show EMA
• EMA period
• EMA color
VWAP Configuration
• Show VWAP
• VWAP color
HTF FVG Configuration
• Show FVG
• Extension mode
• Bullish FVG color
• Bearish FVG color
• Inverted FVG color
Style & Layout
• Pivot lookback for SMT
• SMT colors
• Candle colors
• Number of bars shown
• Bar spacing
• Background frames
• Right offset
• Column spacing
• Chart height
• Row spacing
• Asset / timeframe labels
These controls allow users to fully adapt the layout to their chart style.
Important Notes
This script is designed for visualization purposes only
It does not generate trading signals, alerts, or recommendations
All calculations are based on historical price data
The tool is intended to support chart analysis, not replace independent decision-making Indicator

Indicator

Follow The LineFollow The Line (FTL) is a trend-following indicator that plots a user-defined moving average on the chart and generates visual buy and sell signals based on price interaction with that line. The indicator allows the user to choose the moving average length, source, and type, including SMA, EMA, WMA, VWMA, RMA, and HMA, making it adaptable to different trading styles and timeframes. The plotted line dynamically changes color depending on whether the selected price source is above or below the moving average, providing immediate visual feedback on trend direction.
Buy and sell signals are generated using crossover logic. A buy signal occurs when the selected price source crosses above the moving average, and a sell signal occurs when it crosses below. These signals are displayed directly on the chart as labeled markers, making it easy to identify potential entry points without additional indicators. The script includes an option to enable or disable these labels, as well as full customization of their colors.
To prevent excessive chart clutter, the indicator uses an internal label management system that stores buy and sell labels in separate arrays and limits how many are displayed at any given time. By default, it keeps only the most recent ten buy signals and ten sell signals, automatically removing older labels as new ones appear. This keeps the chart clean while still preserving recent signal history for reference.
Overall, Follow The Line is a clean and flexible moving average crossover tool that emphasizes simplicity and visual clarity. It works best in trending market conditions and can serve either as a standalone signal generator or as a foundation for more advanced strategies by layering in additional filters or confirmations. Indicator

Trinity FlowOverview
This strategy is based on the trading method I used when I first entered the world of investing at age 20. While the original entry conditions and exit rules were quite rough, I've revived this approach with a sense of nostalgia, refining it into a modern form after years of experience.
Strategy Features
Trend Filter: Trend determination using three EMAs (8, 14, 50)
EMA alignment 8 > 14 > 50: Long condition (EMA line: White)
EMA alignment 50 > 14 > 8: Short condition (EMA line: Red)
Other alignments: Range/neutral (EMA line: Gray)
Entry Timing: Stochastic RSI (3, 3, 14, 14) crossover
Long entry on the bar following a confirmed golden cross
Short entry on the bar following a confirmed death cross
Risk Management: ATR (14) based fixed ratios
Stop Loss: ATR × 3
Take Profit: ATR × 2
Visual Design
White EMA line: Long opportunity zone
Red EMA line: Short opportunity zone
Gray EMA line: No clear trading opportunity
Light white box: Profit zone
Light red box: Loss zone
Parameters
All parameters (EMA periods, Stoch RSI settings, ATR period, SL/TP multipliers) are fully adjustable in the settings.
Disclaimer
Frequent false signals may occur in ranging markets
Works best in strong trending markets
Past performance does not guarantee future results
概要
このストラテジーは、私が20歳の頃、初めて投資の世界に入った時に使っていた手法を基にしています。当時は粗削りなエントリー条件と決済ルールでしたが、長年の経験を経て、懐かしさを感じながら現代的な形に復活させました。
手法の特徴
トレンドフィルター:3本のEMA(8, 14, 50)の並び順でトレンドを判定
EMAが8 > 14 > 50の順:ロング条件(EMAライン:白)
EMAが50 > 14 > 8の順:ショート条件(EMAライン:赤)
それ以外:レンジ状態(EMAライン:灰色)
エントリータイミング:Stochastic RSI(3, 3, 14, 14)のクロス
ゴールデンクロス確定後の次足でロングエントリー
デッドクロス確定後の次足でショートエントリー
リスク管理:ATR(14)ベースの固定比率
損切:ATR × 3倍
利確:ATR × 2倍
ビジュアルデザイン
白いEMAライン:ロング狙える状態
赤いEMAライン:ショート狙える状態
灰色のEMAライン:エントリーチャンスなし
薄い白ボックス:利益ゾーン
薄い赤ボックス:損失ゾーン
パラメータ
すべてのパラメータ(EMA期間、Stoch RSI設定、ATR期間、損切・利確倍率)は設定から調整可能です。
注意事項
レンジ相場では頻繁にダマシが発生する可能性があります
強いトレンド相場で最も効果を発揮します
バックテストの結果は過去のパフォーマンスであり、将来の結果を保証するものではありません Strategy

Prismatic Trend Matrix [JOAT]Prismatic Trend Matrix
Introduction
The Prismatic Trend Matrix is an advanced open-source multi-dimensional trend analysis system that combines Hull Moving Average, SuperTrend, ADX strength filtering, and moving average confluence into a unified trend detection engine. This indicator analyzes trend across multiple dimensions simultaneously, creating a prismatic view of market direction with gradient visualization that reveals trend strength and conviction.
Unlike single-indicator trend systems, the Prismatic Trend Matrix provides multi-layered trend intelligence through Hull MA smoothing, SuperTrend band analysis, ADX strength measurement, and EMA/SMA alignment detection. The indicator is designed for traders who understand that strong trends require confirmation across multiple analytical dimensions.
Why This Indicator Exists
This indicator addresses the need for comprehensive trend analysis that goes beyond simple moving averages. By combining four distinct trend methodologies with gradient visualization, it reveals:
Hull Moving Average: Weighted moving average with reduced lag for responsive trend detection
SuperTrend Component: ATR-based bands that identify trend direction and support/resistance
ADX Strength Filter: Measures trend strength to separate strong trends from weak/choppy conditions
Moving Average Matrix: Three EMAs and two SMAs create alignment-based trend confirmation
Trend Classification: Five-state system (Strong Bull, Weak Bull, Sideways, Weak Bear, Strong Bear)
Counter-Trend Detection: Identifies potential reversals when price moves against established trend
Prismatic Gradient: Visual fill between Hull MA and SuperTrend shows trend intensity
Core Components Explained
1. Hull Moving Average (HMA)
The Hull MA uses weighted moving averages to create a smooth trend line with minimal lag:
The calculation involves three steps:
Step 1: Calculate WMA of half-length period
Step 2: Calculate WMA of full-length period
Step 3: Calculate WMA of the difference using square root of length
The result is a moving average that responds quickly to price changes while maintaining smoothness. The indicator applies additional EMA smoothing (default 3 periods) to reduce noise.
2. SuperTrend Calculation
SuperTrend uses ATR-based bands to identify trend direction:
Source: Average of high and low (HL2)
Upper Band: Source + (ATR × Factor)
Lower Band: Source - (ATR × Factor)
Direction: Bullish when close > upper band, bearish when close < lower band
Three modes control band adjustment:
Strict Mode: Bands adjust only when price crosses or previous band is breached
Quick Mode: Bands adjust when price crosses previous band
Quicker Mode: Bands adjust immediately with price
SuperTrend provides dynamic support/resistance levels that adapt to volatility.
3. ADX Strength Measurement
The Average Directional Index measures trend strength:
DI+ (Directional Indicator Plus): Measures upward directional movement
DI- (Directional Indicator Minus): Measures downward directional movement
ADX: Smoothed average of the difference between DI+ and DI-, normalized
Threshold: ADX above threshold (default 25) indicates strong trend
Rising ADX: Indicates strengthening trend momentum
ADX filters out weak trends and choppy conditions, ensuring signals occur only during strong directional movement.
4. Moving Average Matrix
Five moving averages create a trend alignment system:
Fast EMA (9): Short-term trend direction
Medium EMA (21): Intermediate trend direction
Slow EMA (50): Primary trend direction
Fast SMA (50): Smoothed primary trend
Slow SMA (200): Long-term institutional trend
Alignment is measured by comparing the order of these averages:
Bullish Alignment: EMA9 > EMA21 > EMA50 > SMA50 (all in ascending order)
Bearish Alignment: EMA9 < EMA21 < EMA50 < SMA50 (all in descending order)
Mixed Alignment: Averages not in order (choppy or transitional conditions)
Perfect alignment indicates strong institutional conviction in the trend direction.
5. Composite Trend Classification [/b>
The indicator combines all components into a five-state trend classification:
Strong Bull (State 2): Hull rising + SuperTrend bullish + MA alignment bullish + ADX strong
Weak Bull (State 1): Hull rising + (SuperTrend bullish OR MA alignment bullish)
Sideways (State 0): Mixed signals or weak trend conditions
Weak Bear (State -1): Hull falling + (SuperTrend bearish OR MA alignment bearish)
Strong Bear (State -2): Hull falling + SuperTrend bearish + MA alignment bearish + ADX strong
This classification provides clear trend assessment at a glance.
6. Counter-Trend Detection [/b>
The indicator identifies potential reversals when price moves against established trend:
Counter-Trend Bull: Trend state neutral/bearish + close > open + price rising + DI+ > DI- + close > Hull + ADX > 20
Counter-Trend Bear: Trend state neutral/bullish + close < open + price falling + DI- > DI+ + close < Hull + ADX > 20
Counter-trend signals include anti-overlap logic to prevent signal clustering and ensure clean placement.
7. Prismatic Gradient Visualization
The indicator creates a gradient fill between Hull MA and SuperTrend:
Gradient Layers: Multiple intermediate values calculated between Hull and SuperTrend (default 15 layers)
Color Intensity: Transparency increases from Hull (solid) to SuperTrend (transparent)
Dynamic Coloring: Gradient color matches trend state (green = bullish, red = bearish, cyan = sideways)
Visual Effect: Creates a glowing prismatic effect that emphasizes trend strength
The gradient provides intuitive visual feedback on trend intensity and direction.
8. Platform Levels
Platform levels are horizontal lines at the current Hull MA value:
Extension: Lines extend forward and backward from current bar (default 7 bars each direction)
Color Coding: Platform color matches current trend state
Purpose: Provides visual reference for potential support/resistance at Hull MA level
Platforms help identify key levels where price may find support or resistance.
Visual Elements
Hull Trend Line: Thick line (3px) with regime-based coloring showing primary trend
SuperTrend Line: Medium line (2px) with step-line style showing dynamic support/resistance
EMA Matrix: Three thin lines showing fast, medium, and slow EMAs with transparency
Prismatic Gradient: Multi-layer fill between Hull and SuperTrend creating glow effect
Platform Levels: Horizontal lines at Hull MA value extending forward/backward
Counter-Trend Signals: Triangles marking potential reversal points
Background Coloring: Subtle background tint for strong bull/bear states
Information Dashboard: Displays trend state, Hull direction, ADX strength, momentum, alignment, SuperTrend, DI balance, price vs Hull, gradient zone, counter-trend status, and signal
How to Use This Indicator
Step 1: Check Trend State
Monitor the dashboard for current trend state (Strong Bull, Weak Bull, Sideways, Weak Bear, Strong Bear). Trade in the direction of strong states.
Step 2: Verify ADX Strength
Ensure ADX is above threshold (default 25) for strong trends. Low ADX indicates choppy conditions - avoid trend-following strategies.
Step 3: Confirm MA Alignment
Check if moving averages are aligned (Bullish/Bearish/Mixed). Perfect alignment confirms institutional conviction.
Step 4: Monitor Hull Direction
Hull rising = bullish bias, Hull falling = bearish bias. Hull provides the primary trend direction signal.
Step 5: Use SuperTrend for Support/Resistance
SuperTrend line acts as dynamic support in uptrends and resistance in downtrends. Breaks of SuperTrend warn of trend changes.
Step 6: Watch for Counter-Trend Signals
Counter-trend signals at extreme levels may indicate reversals. Use these cautiously and confirm with other factors.
Step 7: Assess Gradient Zone
Price in upper gradient zone (near Hull) = strong trend, price in lower zone (near SuperTrend) = weak trend or potential reversal.
Best Practices
Trade only in Strong Bull or Strong Bear states for highest probability
Avoid trading in Sideways state - wait for clear trend establishment
Use ADX as a filter - only trade when ADX > 25 for strong trends
Confirm trend with MA alignment before entering positions
Use SuperTrend as trailing stop level in trending markets
Counter-trend signals work best at extreme levels with divergence
Monitor gradient zone - price near SuperTrend may indicate trend exhaustion
Combine with higher timeframe trend for additional confirmation
Input Parameters
Hull Trend Engine:
Hull Length: Period for Hull MA calculation (default: 20)
Hull Smoothing: Additional EMA smoothing (default: 3)
SuperTrend Layer:
ATR Period: Period for ATR calculation (default: 10)
ATR Factor: Multiplier for band width (default: 3.0)
Mode: Strict, Quick, or Quicker (default: Quick)
Trend Strength:
ADX Length: Period for ADX calculation (default: 14)
ADX Smoothing: Smoothing period for ADX (default: 14)
Strength Threshold: Minimum ADX for strong trend (default: 25)
MA Matrix:
Fast EMA: Short-term EMA (default: 9)
Medium EMA: Intermediate EMA (default: 21)
Slow EMA: Primary EMA (default: 50)
Fast SMA: Smoothed primary (default: 50)
Slow SMA: Long-term institutional (default: 200)
Visual Configuration:
Bullish/Bearish Trend Colors: Customizable colors for trend states
Sideways/Weak Trend Colors: Colors for neutral and weak states
Gradient Layers: Number of gradient fills (default: 15)
Show Platforms: Toggle platform level display (default: enabled)
Platform Extension: Bars to extend platforms (default: 7)
Originality Statement
This indicator is original in its multi-dimensional trend approach. While individual components (Hull MA, SuperTrend, ADX, EMAs) are established concepts, this indicator is justified because:
It combines four distinct trend methodologies into a unified classification system
The five-state trend classification provides clear trend assessment
Prismatic gradient visualization creates intuitive trend intensity display
Counter-trend detection with anti-overlap logic identifies potential reversals
MA alignment analysis measures institutional conviction
Integration of Hull MA smoothness with SuperTrend adaptability creates balanced trend detection
The comprehensive dashboard presents all trend dimensions simultaneously
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Trend analysis does not guarantee profitable trades. Past trends do not guarantee future trends. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Indicator

Rolling Segment [LuxAlgo]The Rolling Segment indicator provides a dynamic, trend-following reference line that adapts its slope and direction based on price volatility and distance from the market.
🔶 USAGE
The indicator is designed to filter out minor price fluctuations while remaining responsive to significant trend shifts. It appears as a continuous segmented line on the chart, changing color based on the current trend (Green for bullish, Red for bearish).
A gradient fill is applied between the price and the segment to visualize the "stretch" or deviation of the current price action from the trend line. This visual aid helps traders identify when price is moving in lockstep with the trend versus when it is overextending.
🔹 Reversal Signals
The indicator identifies trend reversals when the distance between the price and the segment exceeds a user-defined ATR-based threshold. These reversals are marked on the chart with triangle labels:
A bullish triangle (▲) appears below the segment when a new uptrend begins. A bearish triangle (▼) appears above the segment when a new downtrend begins.
🔹 Speed Modes
The segment operates in two speed modes: "Fast" and "Slow." When price moves significantly away from the segment (crossing the Fast Threshold), the indicator switches to a faster slope to catch up with the momentum. When price is closer to the segment, it maintains a slower, more stable slope to avoid premature trend changes during consolidation.
🔶 MARKET INTERPRETATION
The Rolling Segment acts as a measure of trend health. Because the slope is derived from the Average True Range (ATR), the "speed" of the line is normalized to the asset's current volatility.
Trend Momentum: When the price stays consistently above a green segment (or below a red one) without triggering the "Fast" mode, it indicates a stable, sustainable trend. Price Exhaustion: A sudden jump into "Fast" mode often highlights a surge in momentum. If the price continues to stretch significantly beyond the segment even in fast mode, it may signal an overextended move prone to mean reversion. Consolidation: Horizontal or shallow segments indicate a period where the market is lacking a clear directional driver relative to its recent volatility.
🔶 DETAILS
The core of the script relies on a state-machine logic that governs a unique slope-freezing mechanism. Unlike traditional moving averages that recalculate every bar based on shifting data, this indicator calculates a linear slope and "freezes" it until a specific state change occurs.
The state is defined by the combination of Trend Direction and Speed Mode . The ATR value used to calculate the slope is only updated when:
A trend reversal is detected (Price crosses the Reverse Threshold). The distance between price and the segment crosses the "Fast Threshold," triggering a shift in speed mode. The initial calculation begins at the start of the data series.
By freezing the slope, the indicator produces perfectly linear segments. This mathematical intuition ensures that the reference line moves at a constant "volatility-adjusted rate" per bar, providing a cleaner visual representation of trend momentum and making it easier to spot price exhaustion when the market deviates too far from this constant rate.
🔶 SETTINGS
🔹 Slopes
Fast Slope Length: The period used to determine the slope speed when the price is trending strongly. Lower values result in a steeper, more aggressive slope. Slow Slope Length: The period used to determine the slope speed during standard market conditions. Higher values create a flatter, more trailing segment.
🔹 ATR Settings
ATR Length: The lookback period for the Average True Range calculation, which scales the slope and thresholds to current market volatility.
🔹 Thresholds
Fast Slope Threshold (ATR Multiplier): The distance (in ATR units) the price must reach from the segment to trigger the "Fast" slope mode. Reverse Threshold (ATR Multiplier): The distance (in ATR units) the price must cross against the current trend to trigger a reversal and change the segment direction. Indicator
