//@version=5 strategy("TJR 2026 Updated Strategy", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10) // --- INPUTS --- i_rr = input.float(2.0, title="Risk-to-Reward Ratio", group="Risk Management") i_lookback = input.int(5, title="Structure Lookback (BOS)", group="Strategy Settings") // --- SESSION LIQUIDITY TRACKING --- // Track Session Highs and Lows (Defaults to daily / regular trading hours structure) var float session_high = na var float session_low = na bool is_new_session = ta.change(time("D")) != 0 if (is_new_session) session_high := high session_low := low else session_high := math.max(high, nz(session_high)) session_low := math.min(low, nz(session_low)) // Plot liquidity levels plot(session_high, title="Session High Liquidity", color=color.red, style=plot.style_linebr) plot(session_low, title="Session Low Liquidity", color=color.green, style=plot.style_linebr) // --- 5-MINUTE & 1-MINUTE STRUCTURE MAPPING --- // 5-Minute Break of Structure (BOS) / Reversal triggers float m5_high = ta.highest(high, i_lookback) float m5_low = ta.lowest(low, i_lookback) bool m5_bos_up = ta.crossover(close, m5_high[1]) bool m5_bos_down = ta.crossunder(close, m5_low[1]) // State variables to track manipulation and reversal sequence var bool manipulated_high = false var bool manipulated_low = false if (high >= session_high) manipulated_high := true manipulated_low := false if (low <= session_low) manipulated_low := true manipulated_high := false // --- 1-MINUTE EXECUTION WINDOW --- bool can_trade = strategy.position_size == 0 // Short Execution: Price swept session high, confirmed by M5/M1 breakdown bool execute_short = manipulated_high and m5_bos_down if (can_trade and execute_short) float entry_price = close float stop_loss = high + (ta.atr(14) * 0.2) // Buffer above recent high float risk = stop_loss - entry_price float target = entry_price - (risk * i_rr) if (risk > 0) strategy.entry("TJR Short", strategy.short) strategy.exit("TP/SL Short", "TJR Short", stop=stop_loss, limit=target) manipulated_high := false // Reset state after execution // Long Execution: Price swept session low, confirmed by M5/M1 breakout bool execute_long = manipulated_low and m5_bos_up if (can_trade and execute_long) float entry_price = close float stop_loss = low - (ta.atr(14) * 0.2) // Buffer below recent low float risk = entry_price - stop_loss float target = entry_price + (risk * i_rr) if (risk > 0) strategy.entry("TJR Long", strategy.long) strategy.exit("TP/SL Long", "TJR Long", stop=stop_loss, limit=target) manipulated_low := false // Reset state after execution