SSR V3.8 / 4.0 iFVG-AMD Precision IndicatorGOLD (US$/OZ)TVC:GOLDakonopeesal//@version=5 indicator("SSR V3.8/4.0 iFVG-AMD Precision Indicator", overlay=true, max_lines_count=500, max_labels_count=500, max_boxes_count=500) // ========================================== // INPUTS & CONFIGURATION // ========================================== var string G_GENERAL = "General Settings" in_htf = input.timeframe("60", "HTF Timeframe", group=G_GENERAL) in_lookback = input.int(20, "Sweep Lookback Period", minval=1, group=G_GENERAL) in_atr_period = input.int(14, "ATR Period", minval=1, group=G_GENERAL) in_min_disp_atr = input.float(1.0, "Min Displacement ATR Multiplier", minval=0.1, step=0.1, group=G_GENERAL) in_target_rr = input.float(3.0, "Target RR (TP3)", minval=0.5, step=0.5, group=G_GENERAL) in_tp1_r = input.float(1.0, "TP1 RR Multiplier", minval=0.1, step=0.1, group=G_GENERAL) in_tp2_r = input.float(2.0, "TP2 RR Multiplier", minval=0.1, step=0.1, group=G_GENERAL) in_min_score = input.int(90, "Minimum Score Threshold", minval=0, maxval=100, group=G_GENERAL) var string G_VISUALS = "Visuals & Display" in_show_signals = input.bool(true, "Show Entry Arrows & Labels", group=G_VISUALS) in_show_levels = input.bool(true, "Show Signal SL/TP Lines", group=G_VISUALS) in_show_dashboard = input.bool(true, "Show On-Screen Dashboard", group=G_VISUALS) in_dash_pos = input.string("Top Right", "Dashboard Position", options=, group=G_VISUALS) // ========================================== // HTF DATA FETCHING // ========================================== htf_close = request.security(syminfo.tickerid, in_htf, close, barmerge.gaps_off, barmerge.lookahead_off) htf_open = request.security(syminfo.tickerid, in_htf, open, barmerge.gaps_off, barmerge.lookahead_off) htf_high = request.security(syminfo.tickerid, in_htf, high, barmerge.gaps_off, barmerge.lookahead_off) htf_low = request.security(syminfo.tickerid, in_htf, low, barmerge.gaps_off, barmerge.lookahead_off) // ========================================== // SETUP CONDITIONS & SCORE CALCULATIONS // ========================================== // 1. HTF Trend Condition htf_bull = (htf_close > htf_open) and (htf_close > htf_close) htf_bear = (htf_close < htf_open) and (htf_close < htf_close) // 2. Liquidity Sweep Condition prior_hi = ta.highest(high, in_lookback) prior_lo = ta.lowest(low, in_lookback) buy_sweep = (low < prior_lo) and (close > prior_lo) sell_sweep = (high > prior_hi) and (close < prior_hi) buy_sweep_lvl = prior_lo sell_sweep_lvl = prior_hi // 3. MSS Condition buy_mss = close > high sell_mss = close < low // 4. Displacement Condition atr = ta.atr(in_atr_period) bar_range = high - low displacement = (atr > 0) and (bar_range >= in_min_disp_atr * atr) // 5. iFVG Gap Condition buy_ifvg = low > high sell_ifvg = high < low buy_ft = low buy_fb = high sell_ft = low sell_fb = high // 6. AMD Condition buy_amd = close > htf_low sell_amd = close < htf_high // 7. RR Gate rr_gate = true // Score Computation (BUY) g1_b = htf_bull g2_b = buy_sweep g3_b = buy_mss g4_b = displacement g5_b = buy_ifvg g6_b = buy_amd g7_b = rr_gate buy_score = (g1_b ? 15 : 0) + (g2_b ? 20 : 0) + ((g3_b and g4_b) ? 20 : 0) + (g5_b ? 20 : 0) + (g6_b ? 10 : 0) + (g4_b ? 5 : 0) + (g7_b ? 10 : 0) // Score Computation (SELL) g1_s = htf_bear g2_s = sell_sweep g3_s = sell_mss g4_s = displacement g5_s = sell_ifvg g6_s = sell_amd g7_s = rr_gate sell_score = (g1_s ? 15 : 0) + (g2_s ? 20 : 0) + ((g3_s and g4_s) ? 20 : 0) + (g5_s ? 20 : 0) + (g6_s ? 10 : 0) + (g4_s ? 5 : 0) + (g7_s ? 10 : 0) // Dominant Setup Selection is_buy_dir = buy_score >= sell_score score = is_buy_dir ? buy_score : sell_score all_buy = g1_b and g2_b and g3_b and g4_b and g5_b and g6_b and g7_b all_sell = g1_s and g2_s and g3_s and g4_s and g5_s and g6_s and g7_s all_met = is_buy_dir ? all_buy : all_sell // Entry / SL / TP Calculations entry = is_buy_dir ? (buy_ft + buy_fb) / 2.0 : (sell_ft + sell_fb) / 2.0 sl = is_buy_dir ? math.min(buy_sweep_lvl, buy_fb) : math.max(sell_sweep_lvl, sell_ft) risk = math.abs(entry - sl) valid_risk = risk > (syminfo.mintick * 5) valid_setup = all_met and (score >= in_min_score) and valid_risk tp1 = is_buy_dir ? entry + in_tp1_r * risk : entry - in_tp1_r * risk tp2 = is_buy_dir ? entry + in_tp2_r * risk : entry - in_tp2_r * risk tp3 = is_buy_dir ? entry + in_target_rr * risk : entry - in_target_rr * risk // Gate States for Dashboard gate_state(bool pass) => pass ? "PASS" : "WAIT" htf_pass = is_buy_dir ? g1_b : g1_s sweep_pass = is_buy_dir ? g2_b : g2_s mss_pass = is_buy_dir ? g3_b : g3_s disp_pass = is_buy_dir ? g4_b : g4_s ifvg_pass = is_buy_dir ? g5_b : g5_s amd_pass = is_buy_dir ? g6_b : g6_s get_waiting_reason(htf, sweep, mss, disp, ifvg, amd) => if not htf "WAIT HTF TREND" else if not sweep "WAIT LIQUIDITY SWEEP" else if not mss or not disp "WAIT MSS / DISPLACEMENT" else if not ifvg "WAIT iFVG FLIP + RETEST" else if not amd "WAIT AMD PHASE" else "WAIT RISK / TARGET PATH" reason = valid_setup ? "SETUP READY" : (all_met ? "WAIT MINIMUM SCORE" : get_waiting_reason(htf_pass, sweep_pass, mss_pass, disp_pass, ifvg_pass, amd_pass)) // ========================================== // VISUALIZATIONS & DRAWINGS // ========================================== // Signal Shapes plotshape(in_show_signals and valid_setup and is_buy_dir, title="Buy Signal", style=shape.triangleup, location=location.belowbar, color=color.lime, size=size.small) plotshape(in_show_signals and valid_setup and not is_buy_dir, title="Sell Signal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small) // Signal Levels & Labels if valid_setup and barstate.isconfirmed if in_show_signals string txt = (is_buy_dir ? "BUY" : "SELL") + " SSR " + str.tostring(score) + "\nE: " + str.tostring(entry, "#.#####") + "\nSL: " + str.tostring(sl, "#.#####") + "\nTP3: " + str.tostring(tp3, "#.#####") label.new(bar_index, is_buy_dir ? low : high, text=txt, color=is_buy_dir ? color.green : color.red, textcolor=color.white, style=is_buy_dir ? label.style_label_up : label.style_label_down, size=size.small) if in_show_levels int end_bar = bar_index + 20 line.new(bar_index, sl, end_bar, sl, color=color.red, width=1, style=line.style_dotted) line.new(bar_index, tp1, end_bar, tp1, color=color.aqua, width=1, style=line.style_dotted) line.new(bar_index, tp2, end_bar, tp2, color=color.blue, width=1, style=line.style_dotted) line.new(bar_index, tp3, end_bar, tp3, color=color.lime, width=2, style=line.style_solid) // ========================================== // DASHBOARD DISPLAY TABLE // ========================================== var table_position = in_dash_pos == "Top Right" ? position.top_right : in_dash_pos == "Bottom Right" ? position.bottom_right : in_dash_pos == "Top Left" ? position.top_left : position.bottom_left var table dash = table.new(table_position, 1, 6, bgcolor=color.new(color.black, 15), border_width=1, border_color=color.gray) if in_show_dashboard and barstate.islast color status_clr = valid_setup ? color.lime : (score >= 80 ? color.aqua : color.gold) string direction = is_buy_dir ? "BUY" : "SELL" table.cell(dash, 0, 0, "SSR V3.8/4.0 iFVG-AMD | INDICATOR", text_color=color.aqua, text_size=size.small) table.cell(dash, 0, 1, "BIAS: " + direction + " | SCORE: " + str.tostring(score) + "/100", text_color=status_clr, text_size=size.small) table.cell(dash, 0, 2, "STATUS: " + reason, text_color=color.white, text_size=size.small) table.cell(dash, 0, 3, "HTF " + gate_state(htf_pass) + " | SWEEP " + gate_state(sweep_pass) + " | MSS/DISP " + gate_state(mss_pass and disp_pass), text_color=color.white, text_size=size.small) table.cell(dash, 0, 4, "iFVG " + gate_state(ifvg_pass) + " | AMD " + gate_state(amd_pass) + " | RR " + gate_state(rr_gate), text_color=color.white, text_size=size.small) string level_txt = valid_setup ? "ENTRY: " + str.tostring(entry, "#.##") + " | SL: " + str.tostring(sl, "#.##") + " | TP1: " + str.tostring(tp1, "#.##") + " | TP2: " + str.tostring(tp2, "#.##") + " | TP3: " + str.tostring(tp3, "#.##") : "ENTRY / SL / TP: -- (Waiting for a complete setup)" table.cell(dash, 0, 5, level_txt, text_color=valid_setup ? color.lime : color.gold, text_size=size.small) // ========================================== // ALERTS // ========================================== buy_alert_cond = valid_setup and is_buy_dir and barstate.isconfirmed sell_alert_cond = valid_setup and not is_buy_dir and barstate.isconfirmed alertcondition(buy_alert_cond, title="SSR Buy Signal", message="SSR iFVG-AMD BUY Signal Triggered! Score: {{plot_0}}") alertcondition(sell_alert_cond, title="SSR Sell Signal", message="SSR iFVG-AMD SELL Signal Triggered! Score: {{plot_0}}") if buy_alert_cond alert("SSR iFVG-AMD BUY | Score: " + str.tostring(score) + " | Entry: " + str.tostring(entry) + " | SL: " + str.tostring(sl), alert.freq_once_per_bar_close) if sell_alert_cond alert("SSR iFVG-AMD SELL | Score: " + str.tostring(score) + " | Entry: " + str.tostring(entry) + " | SL: " + str.tostring(sl), alert.freq_once_per_bar_close) GOLD BTCUSD BTCUSD GOLD GOLD # SSR V3.8 / 4.0 iFVG-AMD Precision Indicator ## Overview The **SSR V3.8 / 4.0 iFVG-AMD Precision Indicator** is a multi-confluence Smart Money Concepts (SMC) and ICT analytical tool designed to identify high-probability institutional order flow setups. Rather than relying on single-signal triggers, this indicator evaluates **7 strict gate conditions** and computes a real-time **Confluence Score (0 to 100)**. A setup is only flagged when the total score meets or exceeds your specified threshold (default: 90/100). --- ## Key Features ### 1. Multi-Gate Institutional Confluence Model The scoring engine evaluates the market structure across multiple timeframes using these criteria: * **Higher Timeframe (HTF) Trend:** Ensures alignment with HTF directional bias (e.g., H1 trend alignment while trading M5). * **Liquidity Sweeps:** Identifies key high/low liquidity raids prior to directional shifts. * **Market Structure Shift (MSS):** Detects structural breaks on the lower timeframe. * **ATR Displacement Filter:** Requires the MSS candle to exhibit strong expansion relative to current volatility. * **Inverted Fair Value Gap (iFVG):** Pinpoints price gaps acting as reclaimed support or resistance. * **AMD Framework Alignment:** Verifies Accumulation, Manipulation, and Distribution phase positioning. * **Risk/Reward Path Verification:** Validates that the setup provides clean, unobstructed expansion toward targets. ### 2. Weighted Confluence Scoring System (0 – 100) * **HTF Alignment:** 15 pts * **Liquidity Sweep:** 20 pts * **MSS + Displacement:** 20 pts * **iFVG Structure:** 20 pts * **AMD Phase:** 10 pts * **Displacement Bonus:** 5 pts * **RR Path Validation:** 10 pts > **Note:** Setups below your minimum score threshold (default: 90) are automatically filtered out to eliminate low-quality trades. ### 3. On-Chart Real-Time HUD / Dashboard The built-in table display keeps you informed of market state at a glance: * **Bias:** Directional sentiment (BUY / SELL). * **Confluence Score:** Current metric out of 100 points. * **Gate Checkers:** Individual **PASS** / **WAIT** status for HTF, Sweep, MSS/Disp, iFVG, AMD, and RR. * **Status Reason:** Displays exact pending criteria if a setup is incomplete (e.g., `WAIT LIQUIDITY SWEEP`, `WAIT iFVG FLIP`). * **Execution Levels:** Displays exact Entry, Stop Loss, TP1 (1R), TP2 (2R), and TP3 (Target RR) when a setup activates. ### 4. Visual Levels & Signal Plotting * **Signal Arrows & Labels:** Plotted directly on the trigger bar with entry details. * **Scoped Level Lines:** Automatically projects horizontal levels for SL, TP1, TP2, and TP3 forward from the signal candle to prevent chart clutter. ### 5. Multi-Channel Alert Engine Includes built-in alerts configured for bar-close confirmation to prevent repainting issues: * **Native TradingView Visual & Audio Alerts** * **Webhook & JSON-compatible messaging** for automation bots (Telegram, Discord, 3Commas, Webhook integration) --- ## Inputs & Customization * **HTF Timeframe:** Select higher timeframe bias anchor (Default: `60m` / H1). * **Sweep Lookback:** Number of bars used to establish swing highs/lows for liquidity raids (Default: `20`). * **Min Displacement ATR:** Minimum bar range multiplier relative to ATR to confirm true displacement (Default: `1.0`). * **Target RR (TP3):** Defines the final Risk-to-Reward projection (Default: `3.0`). * **Min Score Threshold:** Confluence bar needed to trigger valid trade execution (Default: `90`). * **Dashboard Position:** Easily place HUD in any chart corner. --- ## Recommended Usage 1. Apply the indicator to your primary entry timeframe (e.g., M5 or M15). 2. Set `HTF Timeframe` to one or two steps higher (e.g., H1 or H4). 3. Wait for the dashboard status to display **SETUP READY**. 4. Combine entry signals with manual market context, session timing (Killzones), and major news calendar filters. --- ### Disclaimer *This indicator is strictly an analytical tool for chart visualization and educational purposes. Past performance is no guarantee of future results. Always manage risk carefully and perform your own backtesting prior to live capital deployment.*