Technical analysis by euphoricPython60831 about Symbol NEAR on 6/8/2025

//version=5indicator("FTG Smart Money Zones - NEAR", overlay=true)// ==== INPUTS ====lengthBOS = input.int(5, "BOS Lookback", minval=1)lengthOB = input.int(20, "Order Block Lookback", minval=1)lengthFVG = input.int(3, "FVG Candle Range", minval=1)// ==== FUNCTIONS ====// Break of Structure (BOS) detection (simple version)var float lastLow = navar float lastHigh = navar bool structureBull = true // true = bullish structure// Update last high/low for structure detectionif (ta.highestbars(high, lengthBOS) == 0) lastHigh := highif (ta.lowestbars(low, lengthBOS) == 0) lastLow := low// Detect BOS and CHOCHbosUp = low < lastLow and structureBullbosDown = high > lastHigh and not structureBullif bosUp structureBull := falseif bosDown structureBull := true// ==== ORDER BLOCK (OB) detection ====// Simplified OB: last bearish candle before bullish BOS or vice versa// Identify bearish and bullish candlesbearCandle = close < openbullCandle = close > open// Track OB zonesvar float obHigh = navar float obLow = navar bool obActive = false// When BOS changes, mark OB zoneif bosUp obHigh := high[lengthBOS] obLow := low[lengthBOS] obActive := trueif bosDown obHigh := high[lengthBOS] obLow := low[lengthBOS] obActive := true// Draw OB zone rectanglevar box obBox = naif obActive box.delete(obBox) obBox := box.new(bar_index - lengthBOS, obHigh, bar_index, obLow, border_color=color.orange, bgcolor=color.new(color.orange, 85))// ==== FAIR VALUE GAP (FVG) detection ====// Check for gaps between candles (wick gap)// For bullish FVG: Low of current candle > High of 2 bars ago (gap up)bullFVG = low > high[2]// For bearish FVG: High of current candle < Low of 2 bars ago (gap down)bearFVG = high < low[2]// Draw FVG zonesvar box fvgBox = naif bullFVG box.delete(fvgBox) fvgBox := box.new(bar_index - 2, high[2], bar_index, low, border