BO - Bar M15 2/3 SignalBO - Bar M15 2/3 Signal show the signal to trade Binary Option with rule below:
A. Indicator
* Bollinger Band (20,2): avoid waterfall
B. Rule of Signal
1. Rule1: Split Bar M15 to 3 part and load them on M5 chart (recommend use M5 IDC chart)
2. Rule 2: Delay 10' after bar M15 open => wait for price's pattern
3. Rule 3: Put Signal row 30-32
* Delay 10' after bar M15 open.
* Direction of 1/3 and 2/3 Bar M15 is upward
* close of 2/3 Bar M15 below upper band Bb(20,2) on M5 chart => avoid strong buy
4. Rule 4: Call Signal row 36-38
* Delay 10' after bar M15 open.
* Direction of 1/3 and 2/3 Bar M15 is downward
* close of 2/3 Bar M15 above lower band Bb(20,2) on M5 chart => avoid strong sell
C. Recommend Expiry time: Bar M15 close
* We try to catch the shadow of Bar M15 but dont trade when price run on the upper or lower band of BB(20,2,M5)
Поиск скриптов по запросу "BOS"
BO - KBSignalBO - KBSignal show Put or Call Signal inoder to trade Binary Option.
A. Indicators
1. Keltner Channel %K (indicator was published in my scripts)
2. OBV's %B (indicator was published in my scripts)
B. Rule of Signal
1. Rule 1: No Signal
- %K is the highest of 3 periods => Possible a Pivot High
- %K is the lowest of 3 periods => Possible a Pivot Low
- Previous %K is greater than or equal 0.8 => Touch Resistance Zone
- Previous %K is less than or equal 0.2 => Touch Support zone
2. Rule 2: Sell and Buy Zone depend on 2 Indicators mentioned in A
- Sell zone = %K<0.45 and Obv's %B <0.45
- Buy zone = %K>0.55 and Obv's %B >0.55
3. Rule 3: Put and Call Signal
- Put Signal = Sell zone and not No Signal
- Call Signal = Buy zone and not No Signal
C. Alert
1. Signal alert = Put Signal or Call Signal alert
2. Put alert = Put Signal alert
3. call alert = Call Signal alert
BO Willians EMA'sBo Williams is a North America/Brazilian trader. He created a trading software called PHI CUBE.
This ema ratios are very used in Brazil. They a based in the Golden Number PHI.
"There is a special ratio that can be used to describe the proportions of everything from nature's smallest building blocks, such as atoms, to the most advanced patterns in the universe, such as unimaginably large celestial bodies. Nature relies on this innate proportion to maintain balance, but the financial markets also seem to conform to this "golden ratio." Here, we take a look at some technical analysis tools that have been developed to take advantage of it.
The Mathematics
Mathematicians, scientists and naturalists have known this ratio for centuries. It's derived from something known as the Fibonacci sequence, named after its Italian founder, Leonardo Fibonacci (whose birth is assumed to be around 1175 A.D. and death around 1250 A.D.). Each term in this sequence is simply the sum of the two preceding terms (1, 1, 2, 3, 5, 8, 13, etc.).
But this sequence is not all that important; rather, it is the quotient of the adjacent terms that possesses an amazing proportion, roughly 1.618, or its inverse 0.618. This proportion is known by many names: the golden ratio, the golden mean, PHI and the divine proportion, among others. So, why is this number so important? Well, almost everything has dimensional properties that adhere to the ratio of 1.618, so it seems to have a fundamental function for the building blocks of nature. "
More here www.goldennumber.net
BO STRATEGY v4.0Multitimeframe channels based strategy for binary options. Non repainting signals. Entry on the next candle after a signal.
BOS TRADER [v 1.0] [Influxum]The name of the tool, BOS Trader, comes from the abbreviation BOS, which stands for Break Of Structure. In simple terms, this tool identifies situations where a change in market structure occurs after liquidity has been grabbed. Following the structural change, it looks for a point where the balance between buyers and sellers will be tested, potentially continuing the price movement in the direction of the structural break.
The goal of this tool is to identify areas where a trader can look for potential entry opportunities based on their entry rules and filters. In our own research, we found that while this tool is not a standalone strategy, it provides a statistical advantage that stems from the nature of the market itself. If you expect the market to reverse at a certain price level against a short-term, medium-term, or long-term trend, that reversal must logically begin with a change in structure – i.e., its break. BOS Trader then highlights the zone where you can expect a strong reaction from traders speculating on the continuation of price in the direction of the break.
Another important piece of the puzzle is the concept of liquidity. Liquidity grabs are generally considered by traders to be events that can trigger market direction changes. That's why BOS Trader is complemented with multiple ways to identify liquidity in the market from a Price Action perspective. We have explored the liquidity concept in depth in our other tools – the Liquidity Tool and Liquidity Strategy Tester – so we won’t go into too much detail on liquidity settings here.
🟪 Pivots
Liquidity can be found beyond pivot extremes – the highest candles in a series of candles. The pivot liquidity setting specifies how many candles must be before and after the pivot candle with a lower high for a pivot high or a higher low for a pivot low. A pivot high is the local highest point of the last 31 candles (15 before the pivot candle, the pivot candle itself, and 15 after). Another option is to set the time period in which the pivot extreme must occur. For example, you can differentiate between pivot highs of the Asian or London session.
🟪 % Percent Change
This setting is based on the well-known Zig Zag indicator and confirms swing highs or swing lows when there is a certain percentage change in price. This helps filter out noise that can occur when the market consolidates and randomly creates pivot highs or lows that aren’t significant.
🟪 Session High/Low
Many popular strategies are based on liquidity defined as the price range of a specific trading session. This doesn't have to be London, Asia, or New York sessions, but could be, for instance, the first hour of the New York session, and so on.
🟪 Day High/Low, Week High/Low, Month High/Low
As the name suggests, liquidity is often defined by the high/low of the previous day, week, or month. These price levels are watched by many market participants, and it's reasonable to expect reactions at these levels. That’s why we included this option in the BOS tool.
Tip for Traders
To avoid common issues with setting the correct session time, we have added the BG option to the tool – the ability to display a background for the configured trading session. This makes it easy to verify that your trading session is set correctly in relation to your time zone.
Delete grabbed liquidity
If a liquidity level is breached by price, it becomes invalid. For those who prefer to keep their charts clean and uncluttered, there is an option to delete grabbed liquidity. This way, only untraded, valid liquidity lines will be visible on the chart.
Bars after liquidity grab
A liquidity grab should be a significant event that triggers a reaction from market participants. To ensure this is a real response to liquidity rather than random market behavior, we added a time test to the BOS tool. A structural break must occur within a specified time after the liquidity grab. You can define this time in the tool as the number of bars after which the structural break is still considered valid following the liquidity grab.
🟪 AOI (Area of Interest) Settings
Initially, it's important to note that there are two main options for setting the behavior of the AOI. The first option is to fix its duration by the number of bars – Duration, and the second is to keep the AOI valid until it is traded through – Extended.
Duration
Since we expect a quick reaction to the liquidity grab, we also expect a fast pullback to the AOI and a swift response of traders. Our research has shown that the strongest reactions typically occur within a maximum of 15 bars from the formation of the AOI (fractally across timeframes). Therefore, this value is set as the default. However, we recommend considering not just the speed of the reaction but also its intensity. After the set number of bars, the AOI stops extending further.
Extended
We have noticed that price has a tendency to return to the AOI even after a longer period and react again. For this reason, we included the option in the BOS tool to extend the AOI into the future, with the ability to freely adjust the Max AOI Length.
🟪 AOI Size Mode
There are two options for setting the size of the AOI. Either it can be calculated as a percentage of the swing size (% of swing) in which the structural break occurred (the default setting is 30%), or you can set a different concept for the AOI size. For example, the well-known Optimal Trade Entry model. Custom values can be set in the FIBO Levels option, where you can define either preferred Fibonacci values or values based on your own criteria.
🟪 Trading Session (signals + alerts + visibility)
The main goal of our tools is to make it easier for traders to identify patterns and opportunities in the market and allow them to be alerted to their occurrence. The time for AOI plotting after a liquidity grab is combined into a single Trading Session function. This controls both the AOI plotting and when the tool will send alerts. All of this is aimed at helping traders avoid spending the entire day in front of their monitors, waiting for trading opportunities. Here, too, you can use the BG feature to plot a background on the chart showing the current session.
🟪 Trading within session range
We found that some traders have difficulty navigating the many AOIs plotted during times when the market consolidates and creates numerous false breakouts. Therefore, we included an option in the BOS tool to track only structural changes at the price extremes of the current day and trading session. The tool will not plot structural changes for internal liquidity grabs (within the session range), but only for external liquidity grabs (highest highs and lowest lows of the session or liquidity from previous days).
Visuals
The BOS tool is, of course, supplemented with the option to customize the appearance of all its components according to your preferences.
BOS/CHoCH Market Structure with Order BlocksCHoCH • BOS • Market Structure Suite with Institutional Order Blocks (Pine Script v6)
This advanced market-structure indicator is designed for traders who rely on clean, rule-based price action. It automatically identifies structural shifts, confirms major trend transitions, and highlights institutional points of interest such as order blocks. Built with precision and clarity, the tool provides multi-layered insight without cluttering the chart.
Key Features
✔ Break of Structure (BOS) Detection
Detects bullish and bearish BOS with strict candle-close confirmation.
Draws colored lines:
Green BOS line when price closes above the previous high.
Red BOS line when price closes below the previous low.
BOS lines automatically label themselves for quick visual reference.
✔ Change of Character (CHoCH)
Identifies the earliest sign of a potential trend reversal.
Prints green CHoCH for bullish shifts and red CHoCH for bearish shifts.
Helps traders anticipate new market phases with precision.
✔ Swing Structure Labels (HH, HL, LH, LL)
Automatically marks all confirmed swing points:
HH, HL (green) for bullish structure
LH, LL (red) for bearish structure
Uses tiny, clean labels to keep the chart readable.
✔ Institutional Order Blocks (Bullish & Bearish)
Identifies valid order blocks using institutional logic.
Bullish Order Blocks: highlights the last bearish candle before bullish displacement.
Bearish Order Blocks: highlights the last bullish candle before bearish displacement.
Draws automatic extended boxes:
Red boxes for bullish order blocks
Blue boxes for bearish order blocks
Boxes extend to the right until mitigation occurs.
✔ Timeframe Filtering for Order Blocks
Order blocks only appear on higher timeframes (1H → Monthly), reducing noise.
Automatically hides order-block zones on lower timeframes.
✔ Fully Customizable Settings
Enable or disable BOS, CHoCH, swing labels, or order blocks.
Adjust colors, line width, font size, transparency, and extension options.
Set the number of order block boxes to keep on screen.
Clean user interface with intuitive controls.
✔ Built for Reliability
Uses defensive coding to prevent runtime errors.
Efficient pivot-handling, minimal label clutter, and safe object management.
Suitable for intraday, swing, and smart money concept traders.
BOS & ChoCh Market StructureBOS/ChoCh Market Structure Indicator
This indicator identifies key market structure shifts using Break of Structure (BOS) and Change of Character (ChoCh) signals based on pivot point analysis.
Concept
Break of Structure (BOS) occurs when price breaks through a significant pivot level in the direction of the current trend, signaling trend continuation. A bullish BOS happens when price breaks above a pivot high while in an uptrend, while a bearish BOS occurs when price breaks below a pivot low during a downtrend.
Change of Character (ChoCh) signals a potential trend reversal. It occurs when price breaks against the prevailing trend - breaking above a pivot high while in a downtrend, or breaking below a pivot low while in an uptrend. This indicates the market structure is shifting.
How It Works
The indicator automatically detects swing highs and lows using configurable pivot strength. When price breaks these levels, it plots:
Color-coded labels (cyan for bullish breaks, red for bearish breaks)
Small horizontal lines marking the exact breakout level
Extended lines from pivot points showing key support/resistance levels
Settings
Pivot Strength - Number of candles on each side required to confirm a swing high/low (default: 5). Higher values identify more significant pivots but produce fewer signals.
Breakout Confirmation - Choose whether breakouts require a candle close beyond the level ("Close") or just a wick touch ("Wick").
Show BOS / Show ChoCh - Toggle visibility of Break of Structure and Change of Character signals independently.
Colors - Customize the colors for bullish (cyan) and bearish (red) signals.
Perfect for swing traders and market structure analysis.
BOS/CHOCH Demand & SupplyThis indicator automatically identifies and plots Supply and Demand zones based on Smart Money Concepts (SMC) methodology. It detects structural breaks in price action and marks the origin zones that initiated these moves.
How It Works (Technical Methodology)
1. Swing Point Detection
The indicator uses Pine Script's ta.pivothigh() and ta.pivotlow() functions to identify swing highs and lows. Users can input multiple lookback periods (e.g., 1, 2, 3, 5, 11, 15, 20) to detect structure across different timeframe perspectives simultaneously.
2. Break of Structure (BOS) Detection
A Bullish BOS is confirmed when:
Current candle closes above the last swing high
Previous candle's high was still below that swing high
The current swing high is higher than the previous swing high (trend continuation)
A Bearish BOS is confirmed when:
Current candle closes below the last swing low
Previous candle's low was still above that swing low
The current swing low is lower than the previous swing low (trend continuation)
3. Change of Character (CHOCH) Detection
A Bullish CHOCH is confirmed when:
Price breaks above the last swing high
But that swing high was lower than the previous swing high (potential reversal signal)
A Bearish CHOCH is confirmed when:
Price breaks below the last swing low
But that swing low was higher than the previous swing low (potential reversal signal)
4. Inducement / Liquidity Grab Filter (Optional)
When enabled, zones are only drawn if the swing point that created them first grabbed liquidity from the previous swing:
For Demand zones: The swing low must have traded below the previous swing low before the bullish break
For Supply zones: The swing high must have traded above the previous swing high before the bearish break
This filter helps identify higher-probability zones where stop-losses were likely triggered before the move.
5. Zone Construction
Demand Zone (Bullish):
Top boundary: max(open, close) of the swing low candle
Bottom boundary: low of the swing low candle
Supply Zone (Bearish):
Top boundary: high of the swing high candle
Bottom boundary: min(open, close) of the swing high candle
This captures the candle body-to-wick range where institutional orders likely reside.
6. Zone Lifecycle Management
Active Zone: Displayed in green (demand) or red (supply)
Mitigated Zone: When price touches the zone but doesn't break it, the zone turns gray (indicating partial fill)
Broken Zone: When price fully breaks through the zone, it is automatically deleted from the chart
How to Use
Demand Zones (Green): Look for long entries when price returns to these zones. The zone represents where buying pressure previously overcame selling.
Supply Zones (Red): Look for short entries when price returns to these zones. The zone represents where selling pressure previously overcame buying.
BOS Zones: Indicate trend continuation - trade in the direction of the break.
CHOCH Zones: Indicate potential reversal - these are early warning signals of trend change.
Enable "Require Inducement" for higher-quality setups where liquidity was grabbed before the structural break.
Multi-Lookback Periods: Using multiple values helps identify zones across different structural levels. Smaller values catch minor structure; larger values catch major structure.
Disclaimer
This indicator is a technical analysis tool and should be used in conjunction with other forms of analysis. Past performance does not guarantee future results. Always use proper risk management.
BoS yellow candleThe "BoS Yellow Candle" indicator identifies and highlights the first candle that breaks a Break of Structure (BoS) in a given look-back period. A BoS occurs when the price either breaks above the highest high or below the lowest low within a user-defined look-back range (default set between 7 and 12 candles).
Bullish Break of Structure: The first candle to break above the previous high is marked with a yellow body.
Bearish Break of Structure: The first candle to break below the previous low is also marked with a yellow body.
This visual aid helps traders quickly identify potential structural breakouts for further analysis or strategy development.
BOS + Liquidity (AOL Detection)This script detects Break of Structure (BOS), swing highs and lows, and liquidity areas (AOL). It marks bullish and bearish BOS when price breaks previous structure points and automatically maps liquidity zones above old highs and below old lows. With adjustable sensitivity, it identifies even small structure breaks. Ideal for traders who rely on SMC, liquidity, and market structure for directional bias and refined entries.
XAUUSD 1m SMC Zones (BOS + Flexible TP Modes + Trailing Runner)//@version=6
strategy("XAUUSD 1m SMC Zones (BOS + Flexible TP Modes + Trailing Runner)",
overlay = true,
initial_capital = 10000,
pyramiding = 10,
process_orders_on_close = true)
//━━━━━━━━━━━━━━━━━━━
// 1. INPUTS
//━━━━━━━━━━━━━━━━━━━
// TP / SL
tp1Pips = input.int(10, "TP1 (pips)", minval = 1)
fixedSLpips = input.int(50, "Fixed SL (pips)", minval = 5)
runnerRR = input.float(3.0, "Runner RR (TP2 = SL * RR)", step = 0.1, minval = 1.0)
// Daily risk
maxDailyLossPct = input.float(5.0, "Max daily loss % (stop trading)", step = 0.5)
maxDailyProfitPct = input.float(20.0, "Max daily profit % (stop trading)", step = 1.0)
// HTF S/R (1H)
htfTF = input.string("60", "HTF timeframe (minutes) for S/R block")
// Profit strategy (Option C)
profitStrategy = input.string("Minimal Risk | Full BE after TP1", "Profit Strategy", options = )
// Runner stop mode (your option 4)
runnerStopMode = input.string( "BE only", "Runner Stop Mode", options = )
// ATR trail settings (only used if ATR mode selected)
atrTrailLen = input.int(14, "ATR Length (trail)", minval = 1)
atrTrailMult = input.float(1.0, "ATR Multiplier (trail)", step = 0.1, minval = 0.1)
// Pip size (for XAUUSD: 1 pip = 0.10 if tick = 0.01)
pipSize = syminfo.mintick * 10.0
tp1Points = tp1Pips * pipSize
slPoints = fixedSLpips * pipSize
baseQty = input.float (1.0, "Base order size" , step = 0.01, minval = 0.01)
//━━━━━━━━━━━━━━━━━━━
// 2. DAILY RISK MANAGEMENT
//━━━━━━━━━━━━━━━━━━━
isNewDay = ta.change(time("D")) != 0
var float dayStartEquity = na
var bool dailyStopped = false
equityNow = strategy.initial_capital + strategy.netprofit
if isNewDay or na(dayStartEquity)
dayStartEquity := equityNow
dailyStopped := false
dailyPnL = equityNow - dayStartEquity
dailyPnLPct = dayStartEquity != 0 ? (dailyPnL / dayStartEquity) * 100.0 : 0.0
if not dailyStopped
if dailyPnLPct <= -maxDailyLossPct
dailyStopped := true
if dailyPnLPct >= maxDailyProfitPct
dailyStopped := true
canTradeToday = not dailyStopped
//━━━━━━━━━━━━━━━━━━━
// 3. 1H S/R ZONES (for direction block)
//━━━━━━━━━━━━━━━━━━━
htOpen = request.security(syminfo.tickerid, htfTF, open)
htHigh = request.security(syminfo.tickerid, htfTF, high)
htLow = request.security(syminfo.tickerid, htfTF, low)
htClose = request.security(syminfo.tickerid, htfTF, close)
// Engulf logic on HTF
htBullPrev = htClose > htOpen
htBearPrev = htClose < htOpen
htBearEngulf = htClose < htOpen and htBullPrev and htOpen >= htClose and htClose <= htOpen
htBullEngulf = htClose > htOpen and htBearPrev and htOpen <= htClose and htClose >= htOpen
// Liquidity sweep on HTF previous candle
htSweepHigh = htHigh > ta.highest(htHigh, 5)
htSweepLow = htLow < ta.lowest(htLow, 5)
// Store last HTF zones
var float htResHigh = na
var float htResLow = na
var float htSupHigh = na
var float htSupLow = na
if htBearEngulf and htSweepHigh
htResHigh := htHigh
htResLow := htLow
if htBullEngulf and htSweepLow
htSupHigh := htHigh
htSupLow := htLow
// Are we inside HTF zones?
inHtfRes = not na(htResHigh) and close <= htResHigh and close >= htResLow
inHtfSup = not na(htSupLow) and close >= htSupLow and close <= htSupHigh
// Block direction against HTF zones
longBlockedByZone = inHtfRes // no buys in HTF resistance
shortBlockedByZone = inHtfSup // no sells in HTF support
//━━━━━━━━━━━━━━━━━━━
// 4. 1m LOCAL ZONES (LIQUIDITY SWEEP + ENGULF + QUALITY SCORE)
//━━━━━━━━━━━━━━━━━━━
// 1m engulf patterns
bullPrev1 = close > open
bearPrev1 = close < open
bearEngulfNow = close < open and bullPrev1 and open >= close and close <= open
bullEngulfNow = close > open and bearPrev1 and open <= close and close >= open
// Liquidity sweep by previous candle on 1m
sweepHighPrev = high > ta.highest(high, 5)
sweepLowPrev = low < ta.lowest(low, 5)
// Local zone storage (one active support + one active resistance)
// Quality score: 1 = engulf only, 2 = engulf + sweep (we only trade ≥2)
var float supLow = na
var float supHigh = na
var int supQ = 0
var bool supUsed = false
var float resLow = na
var float resHigh = na
var int resQ = 0
var bool resUsed = false
// New resistance zone: previous bullish candle -> bear engulf
if bearEngulfNow
resLow := low
resHigh := high
resQ := sweepHighPrev ? 2 : 1
resUsed := false
// New support zone: previous bearish candle -> bull engulf
if bullEngulfNow
supLow := low
supHigh := high
supQ := sweepLowPrev ? 2 : 1
supUsed := false
// Raw "inside zone" detection
inSupRaw = not na(supLow) and close >= supLow and close <= supHigh
inResRaw = not na(resHigh) and close <= resHigh and close >= resLow
// QUALITY FILTER: only trade zones with quality ≥ 2 (engulf + sweep)
highQualitySup = supQ >= 2
highQualityRes = resQ >= 2
inSupZone = inSupRaw and highQualitySup and not supUsed
inResZone = inResRaw and highQualityRes and not resUsed
// Plot zones
plot(supLow, "Sup Low", color = color.new(color.lime, 60), style = plot.style_linebr)
plot(supHigh, "Sup High", color = color.new(color.lime, 60), style = plot.style_linebr)
plot(resLow, "Res Low", color = color.new(color.red, 60), style = plot.style_linebr)
plot(resHigh, "Res High", color = color.new(color.red, 60), style = plot.style_linebr)
//━━━━━━━━━━━━━━━━━━━
// 5. MODERATE BOS (3-BAR FRACTAL STRUCTURE)
//━━━━━━━━━━━━━━━━━━━
// 3-bar swing highs/lows
swHigh = high > high and high > high
swLow = low < low and low < low
var float lastSwingHigh = na
var float lastSwingLow = na
if swHigh
lastSwingHigh := high
if swLow
lastSwingLow := low
// BOS conditions
bosUp = not na(lastSwingHigh) and close > lastSwingHigh
bosDown = not na(lastSwingLow) and close < lastSwingLow
// Zone “arming” and BOS validation
var bool supArmed = false
var bool resArmed = false
var bool supBosOK = false
var bool resBosOK = false
// Arm zones when first touched
if inSupZone
supArmed := true
if inResZone
resArmed := true
// BOS after arming → zone becomes valid for entries
if supArmed and bosUp
supBosOK := true
if resArmed and bosDown
resBosOK := true
// Reset BOS flags when new zones are created
if bullEngulfNow
supArmed := false
supBosOK := false
if bearEngulfNow
resArmed := false
resBosOK := false
//━━━━━━━━━━━━━━━━━━━
// 6. ENTRY CONDITIONS (ZONE + BOS + RISK STATE)
//━━━━━━━━━━━━━━━━━━━
flatOrShort = strategy.position_size <= 0
flatOrLong = strategy.position_size >= 0
longSignal = canTradeToday and not longBlockedByZone and inSupZone and supBosOK and flatOrShort
shortSignal = canTradeToday and not shortBlockedByZone and inResZone and resBosOK and flatOrLong
//━━━━━━━━━━━━━━━━━━━
// 7. ORDER LOGIC – TWO PROFIT STRATEGIES
//━━━━━━━━━━━━━━━━━━━
// Common metrics
atrTrail = ta.atr(atrTrailLen)
// MINIMAL MODE: single trade, BE after TP1, optional trailing
// HYBRID MODE: two trades (Scalp @ TP1, Runner @ TP2)
// Persistent tracking
var float longEntry = na
var float longTP1 = na
var float longTP2 = na
var float longSL = na
var bool longBE = false
var float longRunEntry = na
var float longRunTP1 = na
var float longRunTP2 = na
var float longRunSL = na
var bool longRunBE = false
var float shortEntry = na
var float shortTP1 = na
var float shortTP2 = na
var float shortSL = na
var bool shortBE = false
var float shortRunEntry = na
var float shortRunTP1 = na
var float shortRunTP2 = na
var float shortRunSL = na
var bool shortRunBE = false
isMinimal = profitStrategy == "Minimal Risk | Full BE after TP1"
isHybrid = profitStrategy == "Hybrid | Scalp TP + Runner TP"
//━━━━━━━━━━ LONG ENTRIES ━━━━━━━━━━
if longSignal
if isMinimal
longEntry := close
longSL := longEntry - slPoints
longTP1 := longEntry + tp1Points
longTP2 := longEntry + slPoints * runnerRR
longBE := false
strategy.entry("Long", strategy.long)
supUsed := true
supArmed := false
supBosOK := false
else if isHybrid
longRunEntry := close
longRunSL := longRunEntry - slPoints
longRunTP1 := longRunEntry + tp1Points
longRunTP2 := longRunEntry + slPoints * runnerRR
longRunBE := false
// Two separate entries, each 50% of baseQty (for backtest)
strategy.entry("LongScalp", strategy.long, qty = baseQty * 0.5)
strategy.entry("LongRun", strategy.long, qty = baseQty * 0.5)
supUsed := true
supArmed := false
supBosOK := false
//━━━━━━━━━━ SHORT ENTRIES ━━━━━━━━━━
if shortSignal
if isMinimal
shortEntry := close
shortSL := shortEntry + slPoints
shortTP1 := shortEntry - tp1Points
shortTP2 := shortEntry - slPoints * runnerRR
shortBE := false
strategy.entry("Short", strategy.short)
resUsed := true
resArmed := false
resBosOK := false
else if isHybrid
shortRunEntry := close
shortRunSL := shortRunEntry + slPoints
shortRunTP1 := shortRunEntry - tp1Points
shortRunTP2 := shortRunEntry - slPoints * runnerRR
shortRunBE := false
strategy.entry("ShortScalp", strategy.short, qty = baseQty * 50)
strategy.entry("ShortRun", strategy.short, qty = baseQty * 50)
resUsed := true
resArmed := false
resBosOK := false
//━━━━━━━━━━━━━━━━━━━
// 8. EXIT LOGIC – MINIMAL MODE
//━━━━━━━━━━━━━━━━━━━
// LONG – Minimal Risk: 1 trade, BE after TP1, runner to TP2
if isMinimal and strategy.position_size > 0 and not na(longEntry)
// Move to BE once TP1 is touched
if not longBE and high >= longTP1
longBE := true
// Base SL: BE or initial SL
float dynLongSL = longBE ? longEntry : longSL
// Optional trailing after BE
if longBE
if runnerStopMode == "Structure trail" and not na(lastSwingLow) and lastSwingLow > longEntry
dynLongSL := math.max(dynLongSL, lastSwingLow)
if runnerStopMode == "ATR trail"
trailSL = close - atrTrailMult * atrTrail
dynLongSL := math.max(dynLongSL, trailSL)
strategy.exit("Long Exit", "Long", stop = dynLongSL, limit = longTP2)
// SHORT – Minimal Risk: 1 trade, BE after TP1, runner to TP2
if isMinimal and strategy.position_size < 0 and not na(shortEntry)
if not shortBE and low <= shortTP1
shortBE := true
float dynShortSL = shortBE ? shortEntry : shortSL
if shortBE
if runnerStopMode == "Structure trail" and not na(lastSwingHigh) and lastSwingHigh < shortEntry
dynShortSL := math.min(dynShortSL, lastSwingHigh)
if runnerStopMode == "ATR trail"
trailSLs = close + atrTrailMult * atrTrail
dynShortSL := math.min(dynShortSL, trailSLs)
strategy.exit("Short Exit", "Short", stop = dynShortSL, limit = shortTP2)
//━━━━━━━━━━━━━━━━━━━
// 9. EXIT LOGIC – HYBRID MODE
//━━━━━━━━━━━━━━━━━━━
// LONG – Hybrid: Scalp + Runner
if isHybrid
// Scalp leg: full TP at TP1
if strategy.opentrades > 0
strategy.exit("LScalp TP", "LongScalp", stop = longRunSL, limit = longRunTP1)
// Runner leg
if strategy.position_size > 0 and not na(longRunEntry)
if not longRunBE and high >= longRunTP1
longRunBE := true
float dynLongRunSL = longRunBE ? longRunEntry : longRunSL
if longRunBE
if runnerStopMode == "Structure trail" and not na(lastSwingLow) and lastSwingLow > longRunEntry
dynLongRunSL := math.max(dynLongRunSL, lastSwingLow)
if runnerStopMode == "ATR trail"
trailRunSL = close - atrTrailMult * atrTrail
dynLongRunSL := math.max(dynLongRunSL, trailRunSL)
strategy.exit("LRun TP", "LongRun", stop = dynLongRunSL, limit = longRunTP2)
// SHORT – Hybrid: Scalp + Runner
if isHybrid
if strategy.opentrades > 0
strategy.exit("SScalp TP", "ShortScalp", stop = shortRunSL, limit = shortRunTP1)
if strategy.position_size < 0 and not na(shortRunEntry)
if not shortRunBE and low <= shortRunTP1
shortRunBE := true
float dynShortRunSL = shortRunBE ? shortRunEntry : shortRunSL
if shortRunBE
if runnerStopMode == "Structure trail" and not na(lastSwingHigh) and lastSwingHigh < shortRunEntry
dynShortRunSL := math.min(dynShortRunSL, lastSwingHigh)
if runnerStopMode == "ATR trail"
trailRunSLs = close + atrTrailMult * atrTrail
dynShortRunSL := math.min(dynShortRunSL, trailRunSLs)
strategy.exit("SRun TP", "ShortRun", stop = dynShortRunSL, limit = shortRunTP2)
//━━━━━━━━━━━━━━━━━━━
// 10. RESET STATE WHEN FLAT
//━━━━━━━━━━━━━━━━━━━
if strategy.position_size == 0
longEntry := na
shortEntry := na
longBE := false
shortBE := false
longRunEntry := na
shortRunEntry := na
longRunBE := false
shortRunBE := false
//━━━━━━━━━━━━━━━━━━━
// 11. VISUAL ENTRY MARKERS
//━━━━━━━━━━━━━━━━━━━
plotshape(longSignal, title = "Long Signal", style = shape.triangleup,
location = location.belowbar, color = color.lime, size = size.tiny, text = "L")
plotshape(shortSignal, title = "Short Signal", style = shape.triangledown,
location = location.abovebar, color = color.red, size = size.tiny, text = "S")
Sweep + BOS (Lines + First Confirmed Only)🔍 Indicator: Sweep + BOS (Break of Structure with Visual Lines)
🧠 Overview
This indicator combines Swing detection, Liquidity Sweeps, and Break of Structure (BOS) logic, with:
Customizable swing length,
BOS signals only after confirmed sweeps,
BOS shown only once per sweep,
Visual labels and connecting lines to highlight structure breaks clearly.
⚙️ Inputs
Swing Length:
Defines how many candles to use to identify a swing high/low. Must be an odd number (e.g., 3, 5, 7...).
Sweep Lookback Window:
Sets how far back the script checks for a sweep (false breakout over a swing).
BOS Validity After Sweep:
Number of bars within which a BOS can be considered valid after a sweep.
Toggle Options:
Show/hide:
Swing Labels
Sweep Labels
BOS Labels
BOS Connecting Lines
📌 Logic Breakdown
✅ Swings
Swing High: A candle’s high is greater than the highs of all N candles on both sides.
Swing Low: A candle’s low is lower than the lows of all N candles on both sides.
💧 Liquidity Sweeps
Sweep High:
Price spikes above a previous Swing High,
Then closes back below it (false breakout).
Sweep Low:
Price drops below a previous Swing Low,
Then closes back above it.
🔁 Break of Structure (BOS)
A BOS is only shown if:
It occurs after a valid sweep (within X bars),
It hasn’t been already plotted for that sweep,
BOS ↑ is only possible after Sweep Low,
BOS ↓ is only possible after Sweep High,
Opposite BOS type resets the last BOS state.
BOS ↑ (Bullish):
Confirmed when price closes above previous Swing High after Sweep Low.
Label appears at the candle low.
A line is drawn from the Swing Low to the BOS candle.
BOS ↓ (Bearish):
Confirmed when price closes below previous Swing Low after Sweep High.
Label appears at the candle high.
A line is drawn from the Swing High to the BOS candle.
EMA Market Structure [BOSWaves]EMA Market Structure - Trend-Driven Structural Mapping with Adaptive Swing Detection
Overview
The EMA Market Structure indicator provides an advanced framework for visualizing market structure through dynamically filtered trend and swing analysis.
Unlike conventional EMA overlays, which merely indicate average price direction, this model integrates trend acceleration, swing highs/lows, and break-of-structure (BOS) logic into a unified, visually intuitive display.
Each element adapts in real time to price movement, offering traders a living map of support, resistance, and trend bias that reacts fluidly to market momentum.
The result is a comprehensive, trend-aware representation of price structure.
EMA slope and acceleration guide trend perception, while swing points identify key inflection zones.
Breaks of prior highs or lows are highlighted with visual BOS labels and stop-loss projections, giving traders actionable context for continuation or reversal setups.
Unlike static lines or simple moving averages, the EMA Market Structure indicator fuses dynamic trend analysis with structural awareness to provide a clear picture of market bias and potential turning points.
Theoretical Foundation
The EMA Market Structure builds on principles of momentum filtering and structural analysis.
Standard moving averages track average price but ignore acceleration and context; this indicator captures both the directional slope of the EMA and its rate of change, providing a proxy for trend strength.
Simultaneously, swing detection identifies statistically significant highs and lows, while BOS logic flags decisive breaks in structure, aligned with trend direction.
At its core are three interacting components:
EMA Trend & Acceleration : Smooths price data while highlighting acceleration changes, producing gradient-driven color cues for trend momentum.
Swing Detection Engine : Identifies swing highs and lows over configurable bar lengths, ensuring key turning points are captured with minimal clutter.
Break-of-Structure Logic : Detects price breaches of previous swings and aligns them with EMA trend for actionable BOS signals, including projected stop-loss levels for tactical decision-making.
By integrating these elements, the system scales effectively across timeframes and assets, maintaining structural clarity while visualizing trend dynamics in real time. Traders receive both macro and micro perspectives of market movement, with clear cues for trend continuation or reversal.
How It Works
The EMA Market Structure indicator operates through layered processing stages:
EMA Slope & Acceleration : Calculates the EMA and its rate of change, normalizing via ATR and a smoothing function to produce gradient color coding. This allows instant visual identification of bullish or bearish momentum.
Swing Identification : Swing highs and lows are computed using configurable left/right bar lengths, filtered through a cool-off mechanism to prevent redundant signals and maintain chart clarity.
Structural Lines & Zones : Swing points are connected with lines, and shaded zones are drawn between successive highs/lows to highlight key support and resistance regions.
Break-of-Structure Detection : BOS events occur when price breaches a prior swing in alignment with the EMA trend. Bullish and bearish BOS signals include enhanced label effects and projected stop-loss lines and zones, providing immediate tactical reference.
Dynamic Background Mapping : The chart background adapts to EMA trend direction, reinforcing trend context with subtle visual cues.
Through these processes, the indicator creates a living, adaptive map of market structure that reflects both trend strength and swing-based inflection points.
Interpretation
The EMA Market Structure reframes market reading from simple trend following to structured awareness of price behavior:
Uptrend Phases : EMA is rising with positive acceleration, swings confirm higher lows, and BOS events occur above prior highs, signaling trend continuation.
Downtrend Phases : EMA slope is negative, swings form lower highs, and BOS events occur below prior lows, confirming bearish bias.
Trend Reversals : Flat or decelerating EMA with BOS failures may indicate impending structural change.
Critical Zones : Swing-based lines and shaded zones highlight areas where price may pause, reverse, or accelerate, providing high-probability decision points.
Visually, EMA color gradients, structural lines, and BOS labels combine to provide both statistical trend confirmation and actionable structural cues.
Strategy Integration
EMA Market Structure integrates seamlessly into trend-following and swing-based trading systems:
Trend Alignment : Confirm higher-timeframe EMA slope before entering continuation trades.
BOS Entry Triggers : Use BOS events aligned with EMA trend for tactical entries and stop placement.
Support/Resistance Mapping : Swing lines and zones help define areas for scaling, exits, or reversals.
Volatility Context : ATR-based smoothing and stop-loss buffers accommodate varying market volatility, ensuring robustness across conditions.
Multi-Timeframe Coordination : Combine higher-timeframe EMA trend and swings with lower-timeframe structural events for precision entries.
Technical Implementation Details
Core Engine : EMA slope and ATR-normalized acceleration for gradient-driven trend visualization.
Swing Framework : Pivot-based high/low detection with configurable bar lengths and cool-off intervals.
Structural Visualization : Lines, zones, and labels for high-fidelity mapping of support/resistance and BOS events.
BOS Engine : Detects structural breaks aligned with EMA trend, automatically plotting stop-loss lines and visual cues.
Performance Profile : Lightweight, optimized for real-time responsiveness across multiple timeframes.
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Ideal for intraday swing spotting and microstructure trend tracking.
15 - 60 min : Medium-range structural analysis and BOS-driven entries.
4H - Daily : Macro trend mapping and key swing-based support/resistance identification.
Suggested Configuration:
EMA Length : 50
Swing Length : 5
Swing Cooloff : 10 bars
BOS Cooloff : 15 bars
SL Buffer : 0.1%
These suggested parameters should be used as a baseline; their effectiveness depends on the asset volatility, liquidity, and preferred entry frequency, so fine-tuning is expected for optimal performance.
Performance Characteristics
High Effectiveness:
Trending markets with defined swings and structural consistency.
Markets where EMA slope and acceleration reliably indicate momentum changes.
Reduced Effectiveness:
Choppy or sideways markets with minimal swing definition.
Random walk assets lacking clear structural anchors.
Integration Guidelines
Confluence Framework : Combine with volume, momentum, or BOSWaves structural indicators
to validate entries.
Directional Control: Follow EMA slope and BOS alignment for high-conviction trades.
Risk Calibration: Use SL projections for disciplined exposure management.
Multi-Timeframe Synergy: Confirm higher-timeframe trend before executing lower-timeframe structural trades.
Disclaimer
The EMA Market Structure is a professional-grade trend and structure visualization tool. It is not predictive or guaranteed profitable; performance depends on parameter tuning, market regime, and disciplined execution. BOSWaves recommends using it as part of a comprehensive analytical stack integrating trend, liquidity, and structural context.
Daily Short-Term Levels & Pivots with BOS/CHoCHDaily Short-Term Levels & Pivots with BOS/CHoCH
OverviewThis indicator combines essential tools for short-term and long-term traders, integrating Daily Short-Term Levels (NDCP), Pivots, and detection of Break of Structure (BOS) and Change of Character (CHoCH). Designed for TradingView, it’s ideal for scalping, day trading, and market structure analysis across any timeframe. It provides clear visualization of key levels, pivots, and structural patterns, with customizable settings to suit various trading styles.
Key Features
1. Daily Short-Term Levels (NDCP)
Purpose: Displays support and resistance levels based on the daily open, calculated as bullish and bearish percentages.
Levels: Up to 10 bullish levels (L+1 to L+10) and 10 bearish levels (L-1 to L-10), with configurable percentages (default: 0.236% to 2.618%).
Daily Open: A line marking the daily open price, with an option to display its value.
Customization:
Enable/disable levels and daily open.
Adjust colors, line thickness, and style (solid, dashed, dotted).
Position labels (Left, Right, Center) with adjustable offsets.
Show levels on all timeframes or only on daily and higher.
2. Pivots
Purpose: Identifies significant highs and lows (pivots) on the chart, useful for spotting reversal or continuation points.
Visualization: Green triangles (highs) and red triangles (lows) mark pivot points.
Customization:
Enable/disable pivot visualization.
Adjust the number of left and right bars to define pivots (default: 5 bars).
Change triangle colors.
3. Break of Structure (BOS) and Change of Character (CHoCH)
Purpose: Detects Break of Structure (BOS) and Change of Character (CHoCH) based on pivots, aiding in trend identification and reversals.
Visualization:
Resistance (green) and support (red) lines drawn from the latest pivots.
Labels for "BOS" (trend continuation), "CHoCH" (trend reversal), and "CD" (cross detected).
Historical CHoCH lines (optional, dotted) to track past structural changes.
Customization:
Enable/disable BOS/CHoCH and historical CHoCH lines.
Adjust colors and thickness for lines and labels.
Configure pivot sensitivity for BOS/CHoCH detection.
Indicator Settings
General Settings
Enable Daily Short-Term Levels: Toggle daily open-based levels.
Enable Pivots: Show triangles for significant highs/lows.
Enable BOS and CHoCH: Activate detection of structural breaks and reversals.
Daily Short-Term Levels
Show Daily Levels: Enable/disable bullish and bearish level lines.
Enable on All Timeframes: Display levels on intraday timeframes (e.g., 1M, 5M).
Text Color: Set the color for level labels.
Daily Open: Options to show the open line, its value, color, thickness, and style.
Label Alignment: Left (near daily open), Right (chart edge), or Center, with adjustable offsets.
Bullish/Bearish Levels: Configure percentages (0.236% to 2.618%), colors, line thickness, style, and value visibility.
Pivots and BOS/CHoCH
Pivot Colors: Green for highs, red for lows.
Left/Right Bars: Define pivot sensitivity (number of bars without breaking the high/low).
Show BOS: Enable labels for structural breaks.
Show Historical CHoCH Lines: Display dotted lines for past CHoCH events.
Colors and Thickness: Customize support, resistance, BOS, CHoCH lines, and "CD" labels.
How to Use
Add to Chart:
Search for "Daily Short-Term Levels & Pivots with BOS/CHoCH" in TradingView’s indicators and add it.
Initial Setup:
By default, daily levels, pivots, and BOS/CHoCH are enabled.
Adjust level percentages, colors, and styles to match your strategy.
Interpretation:
Daily Levels: Use bullish (L+1 to L+10) and bearish (L-1 to L-10) levels as support/resistance zones for entries, exits, or stops.
Pivots: Triangles mark key reversal or continuation points. Use them to confirm trends or identify high-probability zones.
BOS/CHoCH:
BOS: Indicates trend continuation (bullish if breaking a support, bearish if breaking a resistance).
CHoCH: Signals a potential trend reversal (bullish to bearish or vice versa).
CD: Confirms a pivot level cross, marking the start of a BOS or CHoCH.
Timeframes:
Ideal for scalping (1M, 5M) with "Enable on All Timeframes" activated.
Effective on higher timeframes (4H, D) for structural analysis.
Customization:
Adjust pivot bars (left_bars, right_bars) for more/less sensitivity.
Configure label offsets to avoid clutter on detailed charts.
Notes and Recommendations
Scalping: Use low timeframes (1M, 5M) with "Enable on All Timeframes" for visible daily levels. Set left_bars/right_bars to lower values (3-5) for faster pivots.
Swing Trading: On higher timeframes (4H, D), daily levels and BOS/CHoCH help identify key trend zones.
Avoid Clutter: If labels overlap, adjust offset_etiquetas, offset_derecha, or offset_centro, or select "Right" or "Center" alignment.
Testing: Experiment with percentage settings and styles to suit your market (Forex, stocks, crypto, etc.).
Limitations: On very low timeframes, pivots may be sensitive to noise. Increase left_bars/right_bars for more robust pivots.
Acknowledgments
Developed with passion for the TradingView community. I hope this indicator enhances your technical analysis! Feel free to leave feedback or contact me with suggestions or issues.
Happy trading!
Vasyl Ivanov | BOS IndicatorBreak of Structure (BoS) & Change of Character (CHoCH) Indicator
This indicator is designed for traders who need to identify critical market turning points, such as Break of Structure (BoS) and Change of Character (CHoCH), to optimize their entry and exit strategies. It offers flexibility and customization to adapt to different trading styles and markets.
Key Features:
Detect Break of Structure (BoS):
The indicator automatically identifies BoS points, highlighting areas where price breaks key support or resistance levels, signaling potential trend continuation or reversal.
Detect Change of Character (CHoCH):
Detects CHoCH, where a sudden shift in market structure occurs, helping traders identify potential reversals earlier.
Customizable Min and Max Length for BoS Detection:
Adjust the minimum and maximum length to refine how the indicator detects BoS based on the market’s volatility and your trading style. This ensures flexibility across different asset classes and timeframes.
Multiple BoS Parameters with Different Styles:
You can configure multiple BoS parameters with individual styles, colors, and line types, allowing you to distinguish between various BoS scenarios for better chart visualization.
How It Works:
The BoS & CHoCH Indicator analyzes price action to detect significant shifts in market structure:
Break of Structure (BoS) occurs when the price breaks beyond a defined range, indicating a possible trend continuation or reversal.
Change of Character (CHoCH) marks a sudden change in the market direction, often signaling the start of a new trend.
With customizable min and max lengths for BoS detection, traders can tailor the indicator to filter out insignificant breaks and focus on meaningful market movements.
Use Cases:
Trend Continuation: Detect BoS to confirm that the current trend is likely to continue, offering potential entry points in the direction of the trend.
Reversal Identification: Use CHoCH detection to identify possible trend reversals early, enabling you to adjust your strategy accordingly.
Chart Clarity: Customize the styling of BoS markers to suit your chart preferences, making key market points more visible for analysis.
Why It’s Unique:
This indicator combines BoS and CHoCH detection with full customization options, giving traders the ability to fine-tune its sensitivity to market movements. By allowing multiple BoS parameters with different visual styles, it’s suited for both intraday scalping and longer-term trading strategies.
SMC BOS/CHoCH + Auto Fib (5m/any TF) durane//@version=6
indicator('SMC BOS/CHoCH + Auto Fib (5m/any TF)', overlay = true, max_lines_count = 200, max_labels_count = 200)
// --------- Inputs ----------
left = input.int(3, 'Pivot Left', minval = 1)
right = input.int(3, 'Pivot Right', minval = 1)
minSwingSize = input.float(0.0, 'Min swing size (price units, 0 = disabled)', step = 0.1)
fib_levels = input.string('0.0,0.236,0.382,0.5,0.618,0.786,1.0', 'Fibonacci levels (comma separated)')
show_labels = input.bool(true, 'Show BOS/CHoCH labels')
lookbackHighLow = input.int(200, 'Lookback for structure (bars)')
// Parse fib levels
strs = str.split(fib_levels, ',')
var array fibs = array.new_float()
if barstate.isfirst
for s in strs
array.push(fibs, str.tonumber(str.trim(s)))
// --------- Find pivot highs / lows ----------
pHigh = ta.pivothigh(high, left, right)
pLow = ta.pivotlow(low, left, right)
// store last confirmed swings
var float lastSwingHighPrice = na
var int lastSwingHighBar = na
var float lastSwingLowPrice = na
var int lastSwingLowBar = na
if not na(pHigh)
// check min size
if minSwingSize == 0 or pHigh - nz(lastSwingLowPrice, pHigh) >= minSwingSize
lastSwingHighPrice := pHigh
lastSwingHighBar := bar_index - right
lastSwingHighBar
if not na(pLow)
if minSwingSize == 0 or nz(lastSwingHighPrice, pLow) - pLow >= minSwingSize
lastSwingLowPrice := pLow
lastSwingLowBar := bar_index - right
lastSwingLowBar
// --------- Detect BOS & CHoCH (simple robust logic) ----------
var int lastBOSdir = 0 // 1 = bullish BOS (price broke above), -1 = bearish BOS
var int lastBOSbar = na
var float lastBOSprice = na
// Look for price closes beyond last structural swings within lookback
// Bullish BOS: close > recent swing high
condBullBOS = not na(lastSwingHighPrice) and close > lastSwingHighPrice and bar_index - lastSwingHighBar <= lookbackHighLow
// Bearish BOS: close < recent swing low
condBearBOS = not na(lastSwingLowPrice) and close < lastSwingLowPrice and bar_index - lastSwingLowBar <= lookbackHighLow
bosTriggered = false
chochTriggered = false
if condBullBOS
bosTriggered := true
if lastBOSdir != 1
// if previous BOS direction was -1, this is CHoCH (change of character)
chochTriggered := lastBOSdir == -1
chochTriggered
lastBOSdir := 1
lastBOSbar := bar_index
lastBOSprice := close
lastBOSprice
if condBearBOS
bosTriggered := true
if lastBOSdir != -1
chochTriggered := lastBOSdir == 1
chochTriggered
lastBOSdir := -1
lastBOSbar := bar_index
lastBOSprice := close
lastBOSprice
// --------- Plot labels for BOS / CHoCH ----------
if bosTriggered and show_labels
if chochTriggered
label.new(bar_index, high, text = lastBOSdir == 1 ? 'CHoCH ↑' : 'CHoCH ↓', style = label.style_label_up, color = color.new(color.orange, 0), textcolor = color.white, yloc = yloc.abovebar)
else
label.new(bar_index, high, text = lastBOSdir == 1 ? 'BOS ↑' : 'BOS ↓', style = label.style_label_left, color = lastBOSdir == 1 ? color.green : color.red, textcolor = color.white, yloc = yloc.abovebar)
// --------- Auto Fibonacci drawing ----------
var array fib_lines = array.new_line()
var array fib_labels = array.new_label()
var int lastFibId = na
// Function to clear previous fibs
f_clear() =>
if array.size(fib_lines) > 0
for i = 0 to array.size(fib_lines) - 1
line.delete(array.get(fib_lines, i))
if array.size(fib_labels) > 0
for i = 0 to array.size(fib_labels) - 1
label.delete(array.get(fib_labels, i))
array.clear(fib_lines)
array.clear(fib_labels)
// Decide anchors for fib: if lastBOSdir==1 (bullish) anchor from lastSwingLow -> lastSwingHigh
// if lastBOSdir==-1 (bearish) anchor from lastSwingHigh -> lastSwingLow
if lastBOSdir == 1 and not na(lastSwingLowPrice) and not na(lastSwingHighPrice)
// bullish fib: low -> high
startPrice = lastSwingLowPrice
endPrice = lastSwingHighPrice
// draw
f_clear()
for i = 0 to array.size(fibs) - 1 by 1
lvl = array.get(fibs, i)
priceLevel = startPrice + (endPrice - startPrice) * lvl
ln = line.new(x1 = lastSwingLowBar, y1 = priceLevel, x2 = bar_index, y2 = priceLevel, xloc = xloc.bar_index, extend = extend.right, color = color.new(color.green, 60), width = 1, style = line.style_solid)
array.push(fib_lines, ln)
lab = label.new(bar_index, priceLevel, text = str.tostring(lvl * 100, '#.0') + '%', style = label.style_label_right, color = color.new(color.green, 80), textcolor = color.white, yloc = yloc.price)
array.push(fib_labels, lab)
if lastBOSdir == -1 and not na(lastSwingHighPrice) and not na(lastSwingLowPrice)
// bearish fib: high -> low
startPrice = lastSwingHighPrice
endPrice = lastSwingLowPrice
f_clear()
for i = 0 to array.size(fibs) - 1 by 1
lvl = array.get(fibs, i)
priceLevel = startPrice + (endPrice - startPrice) * lvl
ln = line.new(x1 = lastSwingHighBar, y1 = priceLevel, x2 = bar_index, y2 = priceLevel, xloc = xloc.bar_index, extend = extend.right, color = color.new(color.red, 60), width = 1, style = line.style_solid)
array.push(fib_lines, ln)
lab = label.new(bar_index, priceLevel, text = str.tostring(lvl * 100, '#.0') + '%', style = label.style_label_right, color = color.new(color.red, 80), textcolor = color.white, yloc = yloc.price)
array.push(fib_labels, lab)
// --------- Optional: plot lastSwing points ----------
plotshape(not na(lastSwingHighPrice) ? lastSwingHighPrice : na, title = 'LastSwingHigh', location = location.absolute, style = shape.triangledown, size = size.tiny, color = color.red, offset = 0)
plotshape(not na(lastSwingLowPrice) ? lastSwingLowPrice : na, title = 'LastSwingLow', location = location.absolute, style = shape.triangleup, size = size.tiny, color = color.green, offset = 0)
// --------- Alerts ----------
alertcondition(bosTriggered and lastBOSdir == 1, title = 'Bullish BOS', message = 'Bullish BOS detected on {{ticker}} @ {{close}}')
alertcondition(bosTriggered and lastBOSdir == -1, title = 'Bearish BOS', message = 'Bearish BOS detected on {{ticker}} @ {{close}}')
alertcondition(chochTriggered, title = 'CHoCH Detected', message = 'CHoCH detected on {{ticker}} @ {{close}}')
// End
Multi Length Market Structure (BoS + ChoCh)█ OVERVIEW
The "Multi Length Market Structure (BoS + ChoCh)" indicator is a technical analysis tool that identifies key pivot points on the chart and signals market structure breaks (Break of Structure - BoS) and changes in market character (Change of Character - ChoCh). It is designed for traders employing market structure-based strategies, enabling the identification of critical support and resistance levels and potential trend reversal points. The indicator offers flexible pivot length settings, customizable colors, and labels, ensuring clarity and precision on the chart.
█ CONCEPTS
The indicator was developed to simplify the identification of changes in market structure, catering to both short-term and longer-term trading strategies. To this end, it simultaneously displays breakouts for four editable pivot lengths. The lengths represent the delay, measured in the number of candles, after which a pivot is recognized. Pivots with larger values are often turning points on higher timeframes, providing a broader view of the market.
Why are BoS and ChoCh important? A Break of Structure (BoS) indicates trend continuation when the price breaks a key level (e.g., a previous high or low). A Change of Character (ChoCh) signals a potential trend reversal when the price breaks a level in the opposite direction of the prior trend. These signals help traders identify moments when the market changes its dynamics, which is crucial for price action strategies.
█ FEATURES
- Pivot Detection: Identifies pivot points (highs and lows) based on four different pivot lengths (default: 5, 10, 15, 20), enabling market structure analysis with varying sensitivity.
- BoS and ChoCh Signals: Generates Break of Structure (BoS) signals in the form of triangles (green for bullish, red for bearish) and Change of Character (ChoCh) signals when the price breaks a key level in the opposite direction of the prior trend.
- Pivot Labels: Displays labels for highs (HH - Higher High, LH - Lower High) and lows (HL - Higher Low, LL - Lower Low) with the option to select which pivot to display them for.
- Customizable Colors and Styles: Allows configuration of colors for BoS and ChoCh signals and pivot labels.
- Alerts: Built-in alerts for BoS and ChoCh signals for each pivot length, including price and signal type descriptions.
█ HOW TO USE
Adding to the Chart: Add the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configuring Settings:
- Pivot Lengths: Set four different pivot lengths (Pivot Length 1-4, default: 5, 10, 15, 20) to adjust the sensitivity of pivot detection. Shorter lengths are more sensitive, while longer lengths are more significant. If you want to use only one length, set all pivot lengths to the same value.
- Colors and Styles: Configure colors for BoS signals (green for bullish, red for bearish) and pivot labels.
- Labels: Enable/disable the display of HH/HL/LH/LL labels and choose which pivot to display them for (Pivot 1-4 or none).
- Signals: BoS and ChoCh signals are displayed as triangles (upward for bullish BoS, downward for bearish). Alerts can be configured for each signal type.
Interpreting Signals:
- Bullish BoS Signal: A green triangle below the candle indicates a breakout above a previous high, suggesting bullish trend continuation.
- Bearish BoS Signal: A red triangle above the candle indicates a breakout below a previous low, suggesting bearish trend continuation.
- Bullish ChoCh Signal: A green triangle after breaking a high in a downtrend indicates a potential reversal to bullish.
- Bearish ChoCh Signal: A red triangle after breaking a low in an uptrend indicates a potential reversal to bearish.
- Pivot Levels: Use pivot points as dynamic support and resistance levels. Levels from longer pivots carry greater significance.
Combine signals with other technical analysis tools, such as RSI (to identify overbought/oversold conditions) or MACD (to confirm momentum). Analyze market structure on higher timeframes for stronger signals. Be particularly cautious when entering positions if RSI approaches overbought/oversold zones and divergences appear, as this may indicate a trend change.
█ APPLICATIONS
- Breakout Strategies: Trade based on BoS signals indicating trend continuation. A BoS signal after breaking a high in an uptrend may suggest a strong bullish impulse, especially when supported by a rising MACD.
- Reversal Strategies: ChoCh signals may indicate a potential trend reversal, particularly when confirmed by other indicators, such as RSI divergences or Fibonacci levels.
AriVestHub_SMCIntroduction to the AriVestHub_SMC Indicator
The AriVestHub_SMC indicator is designed and coded based on Smart Money Concepts (SMC). This tool has unique features that you won’t find in any other indicator built around SMC.
I’ve been active in the crypto market since 2019, and besides using the SMC strategy, I also apply several custom strategies in my trading. Personalized versions of these strategies will gradually be shared with you as well.
The main reason for developing this indicator was the gap in existing tools. Many times, setups like Valid Pullback or Inside Bar Candles appear on the chart but are not easily recognizable at first glance, and therefore they get ignored. This often leads to mistakes in Market Structure Mapping right from the beginning, which then causes errors in further analysis and predictions.
Since the SMC strategy is entirely built on market structure, any mistake in identifying its key components basically destroys the reliability of the analysis.
Unlike similar indicators that mostly just draw nice lines and zones on the chart for promotional purposes, AriVestHub_SMC aims to show the reality of the market, not beautify it. Price behavior is the result of trader psychology and the clash of different views—it doesn’t have to look neat and pretty all the time.
This indicator shows exactly what has happened in the market and the possible scenarios ahead. Once you use this tool and study this guide, you’ll clearly feel the difference compared to other common indicators. My main goal in creating AriVestHub_SMC was to give real help to traders—not just to sell or commercialize it.
The AriVestHub_SMC indicator is basically a Market Structure Mapping Engine (SMC Structure Mapping Engine), whose main task is to detect and accurately map market structure movements.
The market is full of exceptional conditions, and analyzing them without indicators and only by visual inspection is almost impossible. This often leads to errors, especially in strategies that are based on market structure.
One of the most important and valuable features of this indicator compared to similar ones is that, after extensively studying and manually analyzing various charts with indicators, I have coded almost all common scenarios as well as exceptional cases that occur under different market conditions.
________________________________________
Its key features include:
• BOS / CHoCH – Detecting
• breakouts and changes in market character
• IDM / Pullback – Confirming pivots and valid moves
• OF / OB – Marking key supply and demand zones
• SMT (Smart Money Trap) – Spotting invalid zones and smart money traps
• Liquidity Sweeps / Equal High-Low – Liquidity hunts and reversal setups
• Transfer Option – Automatically correcting structure in Single Leg scenarios
________________________________________
Basic Concepts in the AriVestHub_SMC Strategy
1. Inside Bar
An Inside Bar is a candle (or group of candles) whose price range falls between the High and Low of the previous candle.
In Smart Money and market structure analysis, these candles are usually ignored, and only the main candle is considered.
Simply put, an Inside Bar signals market pause and energy buildup—a place where both buyers and sellers are waiting for price to decide its next direction.
In the picture, you can see candles highlighted in a different color that fall within the main candle range. They should not be treated as independent candles, and all of them together should be considered as one.
________________________________________
2. Pullback
A pullback happens when price makes a temporary return after a main move. Even a single candle can cause it.
In Smart Money, a valid pullback is defined as:
• In an uptrend: if the Low of a candle breaks the Low of the previous candle which is not an Inside Bar, a valid pullback occurs.
• In a downtrend: if the High of a candle breaks the High of the previous candle which is not an Inside Bar, a valid pullback occurs.
Valid pullbacks are the points where the market gathers the energy needed to continue its move.
In the image below, both valid and invalid pullbacks are shown.
________________________________________
3. IDM – Inducement
Inducement is one of the most important concepts in AriVestHub_SMC. Without IDM, no structure in Smart Money can form.
Every valid pullback can be considered an IDM.
There are two types: Major IDM and Minor IDM.
Correctly identifying IDM is critical, because the entire market structure is mapped based on it.
After each BOS or CHoCH, a new HH or LL pivot is only confirmed if the price returns and touches the IDM.
• In an uptrend after BOS: the lowest price of the first valid pullback is the Major IDM, and the last pullback before reaching the Major IDM is the Minor IDM.
• In an uptrend after CHoCH: the highest price of the first valid pullback is the Major IDM, and the last pullback before reaching the Major IDM is the Minor IDM.
The same rules apply in reverse for downtrends.
In this strategy, Major IDM always takes priority.
The image shows different types of IDM, and the same applies for downtrends.
________________________________________
4. BOS – Break of Structure
A Break of Structure happens when price breaks its previous High or Low in the direction of the trend:
• In an uptrend: if the previous HH is broken, BOS occurs.
• In a downtrend: if the previous LL is broken, BOS occurs.
BOS confirms continuation of the current market trend.
________________________________________
5. CHoCH – Change of Character
Change of Character occurs when price moves against the previous trend:
• In an uptrend: if the previous LL is broken, CHoCH occurs.
• In a downtrend: if the previous HH is broken, CHoCH occurs.
CHoCH is usually a signal of a trend reversal or a deep market correction.
The image shows the overall market structure with BOS and CHoCH.
________________________________________
6. Order Flow
Order Flow zones are formed from valid pullbacks and are usually points where price reacts strongly.
They are defined as:
• In an uptrend: Last Selling Momentum Before pushing upside
• In a downtrend: Last Buying Momentum Before pushing dowside
Three main types of Order Flow used in this strategy:
• OF: Decisional (Dec) – The first valid OF after IDM, where the market makes its key decision.
• OF: Extreme (Ext) – The last valid OF after IDM, acting as the final defense of buyers or sellers.
• SMT – Smart Money Trap – All order zones before IDM, and those between Dec and Ext. These usually cause short-term, deceptive reactions and are not valid for trading.
In addition:
• Unmitigated Order Flow – A zone not yet touched, still a liquidity source.
• Mitigated Order Flow – A zone that has been touched, with reduced validity.
• Redefine Order Flow – Identifying internal OFs within a main unmitigated OF for more precise entries.
The image shows the different types of OF.
________________________________________
7. H/L Liquidity Sweep
A Liquidity Sweep happens when price breaks a previous High or Low with a wick, but the candle body fails to close beyond it.
• If the High is broken with a wick but the candle closes below it, a Liquidity Sweep occurs.
• If the Low is broken with a wick but the candle closes above it, a Liquidity Sweep occurs.
These setups are often signs of trapping traders and starting a move in the opposite direction. In fact, Liquidity Sweep points are among the best trading setups.
________________________________________
🔑 Final Note
All these concepts are like puzzle pieces: Inside Bar, Valid Pullback, IDM, BOS, CHoCH, Order Flow, and Liquidity Sweep.
When combined, they create a clear and accurate picture of the market’s real behavior.
________________________________________
Indicator Settings
1. Analyze From … To …
• Set the analysis time range.
• Another use: In ping-pong structures, you can add another copy of the indicator to the chart, set the starting point at the recent HH or LL, and map the internal structure for counter-trend trading.
________________________________________
2. Main
• Confirm CHoCH with wicks → If enabled, only the wick (not the body) is considered for BOS and CHoCH confirmation. Useful for spotting subtle liquidity-based breaks.
• Major / Minor IDM → Choose IDM type.
• Consider Inside Bar → Best kept enabled, so candles inside the previous candle are ignored.
________________________________________
3. Fib Ret
• Min pullback retracement % → Set the minimum retracement level.
• Helps identify valid pullbacks and gives more confidence in trend continuation.
• Meaning: if BOS happens, price must at least retrace by the minimum percentage before expecting the trend to continue.
________________________________________
4. BOS/CHoCH
• Display BOS and CHoCH on the chart with customizable color and style.
________________________________________
5. IDM
• Mark previous IDM : Show past IDMs.
• Mark live IDM : Show current active IDM.
• Customize IDM display options.
________________________________________
6. Pivots
• Display HH and LL pivots.
________________________________________
7. Transferring H/L IDM BOS/CHoCH
• Transfer in case of lack idmB or idmS → When the move is Single Leg and no valid IDM exists in the recent move, HH, LL, and IDM must be shifted and corrected. This adjusts the market structure.
• In case of transferring, remove all previous transferred Market Structure → If enabled, every time HH/LL and IDM need to be shifted, the transfer happens and the market structure is re-analyzed from scratch.
• Important: Often after one transfer, another Single Leg appears. This option keeps adjusting structure automatically, while doing it manually would be slow and error-prone.
________________________________________
8. Order Flow
• Display Decisional, Extreme, and Supply/Demand OFs.
________________________________________
9. H/L Sweeps
• Detect Liquidity Sweeps at Highs and Lows.
• These are very strong reversal setups.
________________________________________
10. Equal High/Low
• Show equal Highs and Lows where liquidity often accumulates.
________________________________________
11. Moving Average
• Add a moving average as a trend filter.
• Option to choose type (SMA/EMA) and length (e.g., 50 or 200).
• Usually:
o MA50 → For mid-term trends, quick confirmation.
o MA200 → For long-term trends, stronger confirmation.
________________________________________
12. Internal Structure (ZigZag)
• Show internal market structure as ZigZag.
________________________________________
13. Inside Bar Candles
• Display Inside Bars in color or with a box.
Structural Liquidity Signals [BullByte]Structural Liquidity Signals (SFP, FVG, BOS, AVWAP)
Short description
Detects liquidity sweeps (SFPs) at pivots and PD/W levels, highlights the latest FVG, tracks AVWAP stretch, arms percentile extremes, and triggers after confirmed micro BOS.
Full description
What this tool does
Structural Liquidity Signals shows where price likely tapped liquidity (stop clusters), then waits for structure to actually change before it prints a trigger. It spots:
Liquidity sweeps (SFPs) at recent pivots and at prior day/week highs/lows.
The latest Fair Value Gap (FVG) that often “pulls” price or serves as a reaction zone.
How far price is stretched from two VWAP anchors (one from the latest impulse, one from today’s session), scaled by ATR so it adapts to volatility.
A “percentile” extreme of an internal score. At extremes the script “arms” a setup; it only triggers after a small break of structure (BOS) on a closed bar.
Originality and design rationale, why it’s not “just a mashup”
This is not a mashup for its own sake. It’s a purpose-built flow that links where liquidity is likely to rest with how structure actually changes:
- Liquidity location: We focus on areas where stops commonly cluster—recent pivots and prior day/week highs/lows—then detect sweeps (SFPs) when price wicks beyond and closes back inside.
- Displacement context: We track the last Fair Value Gap (FVG) to account for recent inefficiency that often acts as a magnet or reaction zone.
- Stretch measurement: We anchor VWAP to the latest N-bar impulse and to the Daily session, then normalize stretch by ATR to assess dislocation consistently across assets/timeframes.
- Composite exhaustion: We combine stretch, wick skew, and volume surprise, then bend the result with a tanh transform so extremes are bounded and comparable.
- Dynamic extremes and discipline: Rather than triggering on every sweep, we “arm” at statistical extremes via percent-rank and only fire after a confirmed micro Break of Structure (BOS). This separates “interesting” from “actionable.”
Key concepts
SFP (liquidity sweep): A candle briefly trades beyond a level (where stops sit) and closes back inside. We detect these at:
Pivots (recent swing highs/lows confirmed by “left/right” bars).
Prior Day/Week High/Low (PDH/PDL/PWH/PWL).
FVG (Fair Value Gap): A small 3‑bar gap (bar2 high vs bar1 low, or vice versa). The latest gap often acts like a magnet or reaction zone. We track the most recent Up/Down gap and whether price is inside it.
AVWAP stretch: Distance from an Anchored VWAP divided by ATR (volatility). We use:
Impulse AVWAP: resets on each new N‑bar high/low.
Daily AVWAP: resets each new session.
PR (Percentile Rank): Where the current internal score sits versus its own recent history (0..100). We arm shorts at high PR, longs at low PR.
Micro BOS: A small break of the recent high (for longs) or low (for shorts). This is the “go/no‑go” confirmation.
How the parts work together
Find likely liquidity grabs (SFPs) at pivots and PD/W levels.
Add context from the latest FVG and AVWAP stretch (how far price is from “fair”).
Build a bounded score (so different markets/timeframes are comparable) and compute its percentile (PR).
Arm at extremes (high PR → short candidate; low PR → long candidate).
Only print a trigger after a micro BOS, on a closed bar, with spacing/cooldown rules.
What you see on the chart (legend)
Lines:
Teal line = Impulse AVWAP (resets on new N‑bar extreme).
Aqua line = Daily AVWAP (resets each session).
PDH/PDL/PWH/PWL = prior day/week levels (toggle on/off).
Zones:
Greenish box = latest Up FVG; Reddish box = latest Down FVG.
The shading/border changes after price trades back through it.
SFP labels:
SFP‑P = SFP at Pivot (dotted line marks that pivot’s price).
SFP‑L = SFP at Level (at PDH/PDL/PWH/PWL).
Throttle: To reduce clutter, SFPs are rate‑limited per direction.
Triggers:
Triangle up = long trigger after BOS; triangle down = short trigger after BOS.
Optional badge shows direction and PR at the moment of trigger.
Optional Trigger Zone is an ATR‑sized box around the trigger bar’s close (for visualization only).
Background:
Light green/red shading = a long/short setup is “armed” (not a trigger).
Dashboard (Mini/Pro) — what each item means
PR: Percentile of the internal score (0..100). Near 0 = bullish extreme, near 100 = bearish extreme.
Gauge: Text bar that mirrors PR.
State: Idle, Armed Long (with a countdown), or Armed Short.
Cooldown: Bars remaining before a new setup can arm after a trigger.
Bars Since / Last Px: How long since last trigger and its price.
FVG: Whether price is in the latest Up/Down FVG.
Imp/Day VWAP Dist, PD Dist(ATR): Distance from those references in ATR units.
ATR% (Gate), Trend(HTF): Status of optional regime filters (volatility/trend).
How to use it (step‑by‑step)
Keep the Safety toggles ON (default): triggers/visuals on bar‑close, optional confirmed HTF for trend slope.
Choose timeframe:
Intraday (5m–1h) or Swing (1h–4h). On very fast/thin charts, enable Performance mode and raise spacing/cooldown.
Watch the dashboard:
When PR reaches an extreme and an SFP context is present, the background shades (armed).
Wait for the trigger triangle:
It prints only after a micro BOS on a closed bar and after spacing/cooldown checks.
Use the Trigger Zone box as a visual reference only:
This script never tells you to buy/sell. Apply your own plan for entry, stop, and sizing.
Example:
Bullish: Sweep under PDL (SFP‑L) and reclaim; PR in lower tail arms long; BOS up confirms → long trigger on bar close (ATR-sized trigger zone shown).
Bearish: Sweep above PDH/pivot (SFP‑L/P) and reject; PR in upper tail arms short; BOS down confirms → short trigger on bar close (ATR-sized trigger zone shown).
Settings guide (with “when to adjust”)
Safety & Stability (defaults ON)
Confirm triggers at bar close, Draw visuals at bar close: Keep ON for clean, stable prints.
Use confirmed HTF values: Applies to HTF trend slope only; keeps it from changing until the HTF bar closes.
Performance mode: Turn ON if your chart is busy or laggy.
Core & Context
ATR Length: Bigger = smoother distances; smaller = more reactive.
Impulse AVWAP Anchor: Larger = fewer resets; smaller = resets more often.
Show Daily AVWAP: ON if you want session context.
Use last FVG in logic: ON to include FVG context in arming/score.
Show PDH/PDL/PWH/PWL: ON to see prior day/week levels that often attract sweeps.
Liquidity & Microstructure
Pivot Left/Right: Higher values = stronger/rarer pivots.
Min Wick Ratio (0..1): Higher = only more pronounced SFP wicks qualify.
BOS length: Larger = stricter BOS; smaller = quicker confirmations.
Signal persistence: Keeps SFP context alive for a few bars to avoid flicker.
Signal Gating
Percent‑Rank Lookback: Larger = more stable extremes; smaller = more reactive extremes.
Arm thresholds (qHi/qLo): Move closer to 0.5 to see more arms; move toward 0/1 to see fewer arms.
TTL, Cooldown, Min bars and Min ATR distance: Space out triggers so you’re not reacting to minor noise.
Regime Filters (optional)
ATR percentile gate: Only allow triggers when volatility is at/above a set percentile.
HTF trend gate: Only allow longs when the HTF slope is up (and shorts when it’s down), above a minimum slope.
Visuals & UX
Only show “important” SFPs: Filters pivot SFPs by Volume Z and |Impulse stretch|.
Trigger badges/history and Max badge count: Control label clutter.
Compact labels: Toggle SFP‑P/L vs full names.
Dashboard mode and position; Dark theme.
Reading PR (the built‑in “oscillator”)
PR ~ 0–10: Potential bullish extreme (long side can arm).
PR ~ 90–100: Potential bearish extreme (short side can arm).
Important: “Armed” ≠ “Enter.” A trigger still needs a micro BOS on a closed bar and spacing/cooldown to pass.
Repainting, confirmations, and HTF notes
By default, prints wait for the bar to close; this reduces repaint‑like effects.
Pivot SFPs only appear after the pivot confirms (after the chosen “right” bars).
PD/W levels come from the prior completed candles and do not change intraday.
If you enable confirmed HTF values, the HTF slope will not change until its higher‑timeframe bar completes (safer but slightly delayed).
Performance tips
If labels/zones clutter or the chart lags:
Turn ON Performance mode.
Hide FVG or the Trigger Zone.
Reduce badge history or turn badge history off.
If price scaling looks compressed:
Keep optional “score”/“PR” plots OFF (they overlay price and can affect scaling).
Alerts (neutral)
Structural Liquidity: LONG TRIGGER
Structural Liquidity: SHORT TRIGGER
These fire when a trigger condition is met on a confirmed bar (with defaults).
Limitations and risk
Not every sweep/extreme reverses; false triggers occur, especially on thin markets and low timeframes.
This indicator does not provide entries, exits, or position sizing—use your own plan and risk control.
Educational/informational only; no financial advice.
License and credits
© BullByte - MPL 2.0. Open‑source for learning and research.
Built from repeated observations of how liquidity runs, imbalance (FVG), and distance from “fair” (AVWAPs) combine, and how a small BOS often marks the moment structure actually shifts.
HH HL LH LL + BOS / CHoCHHH HL LH LL + BOS / CHoCH Structure Indicator (ATR Adaptive)
This indicator provides a complete market structure framework using swing-based pivots, real-time trend detection, BOS (Break of Structure), CHoCH (Change of Character), and optional ATR-adaptive swing sensitivity.
🔹 Core Features
1. Market Structure Labels
The script detects and labels:
HH – Higher High
LH – Lower High
HL – Higher Low
LL – Lower Low
These labels help visualize trend continuation or weakness in structure.
Each label type can be individually toggled ON/OFF in settings.
2. ATR-Based Adaptive Swing Length (Optional)
Swing pivots can be calculated using:
A fixed manual swing length, or
A dynamic ATR-based swing length that adjusts automatically to volatility.
Increasing volatility → longer swings
Decreasing volatility → tighter swings
This makes structure detection more stable and timeframe-adaptive.
3. Close-Based Break of Structure (BOS)
The indicator identifies a BOS when:
Price closes above the previous swing high (Bullish BOS↑)
Price closes below the previous swing low (Bearish BOS↓)
BOS labels can be turned ON/OFF without affecting internal calculations.
4. CHoCH (Change of Character)
CHoCH is triggered when a BOS occurs against the current trend, indicating a potential trend reversal:
CHoCH↑ – Bearish → Bullish reversal
CHoCH↓ – Bullish → Bearish reversal
CHoCH remains active even when BOS labels are turned off.
5. Alerts
The indicator provides alert conditions for:
CHoCH↑ (Bullish Trend Shift)
CHoCH↓ (Bearish Trend Shift)
This allows traders to automate notifications for significant trend changes.
6. Trend State Tracking
The script internally tracks the current structure-based trend:
Uptrend
Downtrend
Undefined
The trend updates dynamically based on real BOS events.
7. Fully Backwards Compatible
The indicator generates structure, BOS, and CHoCH even when scrolling back deep in chart history, thanks to extended max_bars_back handling.
Summary
This tool provides a complete, flexible, and non-repainting framework for market structure analysis, suitable for:
SMC/ICT traders
Swing & intraday traders
Trend traders
Price action analysts
With adaptive swing detection, clean structure labeling, BOS/CHoCH logic, and alert integration, the indicator helps traders understand market transitions with clarity and precision.
EBL - Enhanced BOS LogicEBL - Enhanced BOS Logic
The EBL (Enhanced Break of Structure Logic) script is a powerful tool for traders who want to identify and act on key structural shifts in the market. By combining visual cues, such as horizontal lines and dynamic arrows, the script highlights critical points of interest where market behavior may indicate significant bullish or bearish momentum.
What Makes EBL Unique?
Break of Structure (BOS) Identification:
The script dynamically detects when price breaks above or below significant highs and lows, marking these levels as key BOS points.
Once a BOS level is confirmed, it is displayed on the chart as a horizontal line, allowing traders to easily identify areas of potential support and resistance.
Real-Time Validation and Invalidations:
Bullish BOS levels remain active until a bearish candle closes below the initiating bullish candle.
Similarly, bearish BOS levels remain active until a bullish candle closes above the initiating bearish candle.
If a BOS level is invalidated, both the corresponding line and its arrow are automatically removed to maintain chart clarity.
Visual Clarity with Arrows and Lines:
Customizable triangle arrows (green for bullish and red for bearish) appear alongside lines to signal entry opportunities.
Traders can adjust line length, colors, and visibility of arrows to fit their charting style.
Alerts for Confirmation:
Receive alerts when bullish or bearish structures are confirmed, ensuring you never miss a signal even when away from your chart.
How the Script Works
Detection of Bullish and Bearish Structures:
The script identifies a "Bullish Break" when the price closes above the high of a bullish candle followed by a bearish one.
A "Bearish Break" is detected when the price closes below the low of a bearish candle followed by a bullish one.
Line and Arrow Placement:
Horizontal lines are drawn at the high or low of the respective BOS level.
Triangular arrows are plotted just below or above the respective levels to indicate potential trade opportunities.
Automatic Cleanup:
When a line is invalidated by opposing market movement, both the line and its connected arrow are automatically removed from the chart.
How to Use EBL
Settings:
Adjust line colors (green for bullish, red for bearish) to suit your charting theme.
Customize arrow visibility or hide lines if you prefer a less cluttered chart.
Set the horizontal line length to match your desired timeframe and analysis depth.
Trading Concepts:
Trend Reversal Zones: Use invalidated BOS levels as signals for possible trend reversals.
Momentum Trading: Follow confirmed BOS levels to identify areas where price momentum is likely to continue.
Dynamic Support and Resistance: Leverage the lines to identify evolving support and resistance zones.
Alerts:
Enable alerts to receive notifications when bullish or bearish trends are confirmed, allowing you to stay informed without constant monitoring.
Conceptual Basis
This script is based on the widely used market structure concept, which is fundamental to price action trading. By tracking the highs and lows created by bullish and bearish movements, the EBL script provides an objective and systematic approach to identifying and trading key structural points in the market.
With the EBL - Enhanced BOS Logic, traders can visually and systematically track market structure, identify potential trade setups, and maintain a cleaner chart with automated line and arrow management. This script is ideal for trend-following, scalping, and swing trading strategies across all markets and timeframes.
ICT SMC Custom — BOS/MSS + OB + FVGWant me to fill that box? Here’s a ready‑to‑paste description for your publish screen:
⸻
ICT SMC Custom — BOS/MSS + OB + FVG (Crypto‑friendly)
A clean Smart Money Concepts tool that marks Break of Structure (BOS), Market Structure Shift (MSS), Order Blocks (OB), and Fair Value Gaps (FVG) with bold, easy‑to‑see visuals. Built for crypto but works on any market and timeframe.
What it does
• BOS & MSS detection with optional body/wick logic
• Order Blocks: auto‑draws the last opposite candle before a BOS, keeps only the most recent N, and fades when mitigated
• FVGs: 3‑candle gaps with a minimum size filter and a cap on how many to keep
• HTF Swings (optional): plots higher‑timeframe pivot highs/lows for top‑down context
• Alerts for BOS/MSS and FVG formation
Inputs
• Swing pivot length (default 3): sensitivity for structure pivots
• Use candle bodies for breaks: close vs level (on) or wicks (off)
• Show BOS/MSS labels, Show FVG, Show Order Blocks
• Min FVG size (ticks) and Max boxes to keep for FVG/OB
• OB uses candle body: body range vs full wick range
• Show higher timeframe swings + HTF timeframe
• Bullish/Bearish colors
How it works
• BOS triggers when price breaks the last opposite swing.
• MSS flags when the break flips the prior bias.
• OB is the most recent opposite candle prior to BOS; it’s marked and later greyed out once price closes through it (mitigation).
• FVG is detected when candle 1’s high < candle 3’s low (bear) or candle 1’s low > candle 3’s high (bull).
Alerts included
• BOS Up / BOS Down
• MSS Up / MSS Down
• FVG Up / FVG Down
Tips
• Start on 15m/1h for crypto, pivot length 3–5.
• Turn Use candle bodies ON for stricter confirmations, OFF for more signals.
• If boxes look cluttered, lower “Max boxes to keep.”
Note: This is a visual/educational tool, not financial advice. Always confirm with your own plan and risk management.
Support & Resistance External/Internal & BoS [sgbpulse]Market Structure Support & Resistance External/Internal & BoS
Overview: Smart & Fast Market Structure Analysis
The Market Structure "Support & Resistance External/Internal & BoS " indicator is designed to empower your technical analysis by automatically and precisely identifying significant support and resistance levels. It achieves this by pinpointing high and low Pivot Points, plus key Pre-Market High/Low levels.
Its unique strength lies in its dynamic adaptability to any timeframe and any asset you choose. This tool analyzes the relevant market structure for the current timeframe and asset, providing you with accurate and relevant levels in real-time. The indicator maintains a clean chart and swiftly displays all support, resistance, and Pre-Market levels for any asset, saving valuable analysis time and enabling you to get a clear and quick snapshot of the market.
How the Indicator Works
The indicator identifies and displays three critical types of key levels:
External Pivots: These are more significant pivot points, indicating important reversal points across a broader range of price movement, considering the current timeframe. The indicator draws dark green support lines (for low pivots) and dark red resistance lines (for high pivots) from these points.
Internal Pivots: These are shorter-term pivot points, signifying smaller corrections or reversals within the overall structure of the current timeframe. These lines provide additional areas of interest within the ranges of the External Pivots.
Pre-Market High/Low Levels: The indicator displays the High and Low reached during pre-market hours as distinct lines on the chart. Please note: These levels will only appear when the selected timeframe is lower than one day (e.g., 1-hour, 15-minute) and provided that the "Session extended trading hours" option is enabled in your TradingView chart settings. These levels are crucial for identifying potential opening ranges and critical support/resistance areas upon regular market open, especially for intraday trading.
Break of Structure (BoS) Identification
A key feature of this indicator is its ability to identify Break of Structure (BoS). When a support or resistance line is breached, the indicator changes the line's color to gray and displays a "Break of Structure" label, indicating a potential trend change or continuation:
External BoS: When an external support/resistance line is broken, a "BoS" label in red will appear. This is a strong signal for a potential shift in the primary market structure or a strong trend continuation.
Internal BoS: When an internal support/resistance line is broken, an "iBoS" label in green will appear. This indicates a break within the existing market structure, which can be used to confirm direction or identify shorter-term entry/exit opportunities.
Full Indicator Customization
The indicator provides maximum flexibility to suit any trading style and timeframe:
Number of Lines Displayed: You can choose how many support and resistance lines you want to see on your chart. The default is 15 lines, but you can increase or decrease this number according to your needs and desired level of detail.
External Pivot Settings: Define the number of bars before and after a pivot point required for External Pivot identification.
Internal Pivot Settings: Define the number of bars before and after a pivot point required for Internal Pivot identification.
Color Customization: Full control over colors! You can change the colors of the support and resistance lines, the colors of the Pre-Market levels, and also the colors of the BoS and iBoS labels to create a visual appearance that perfectly matches your personal preferences.
This flexibility allows you to adapt the indicator to your trading style and any timeframe you operate in, without needing to manually change settings each time.
Recommended Uses
Clean Chart & Quick Analysis: The indicator displays important levels clearly, enabling quick identification of areas of interest without visual clutter on the chart. This significantly saves analysis time and allows you to make faster decisions.
Critical Levels for Any Timeframe & Asset: Get precise and adaptive support and resistance, plus essential Pre-Market levels (in relevant timeframes), for any timeframe and on any asset you choose.
Trend Direction Identification: Clear support and resistance lines help understand market structure.
Breakout Confirmation: The BoS label provides visual confirmation of key level breaches, helping to confirm potential trend changes.
Locating Entry & Exit Points: Use these levels as potential areas of interest for trades, after confirming a breakout or reversal.
Finding Stop-Loss & Take-Profit Points: Strategically place protective stops and profit targets around these support and resistance levels.
Important Note
Like any technical indicator, Market Structure "Support & Resistance External/Internal & BoS " is a supplementary tool. It's highly recommended to use it in conjunction with additional analysis methods (such as price action analysis, other indicators, and fundamental analysis) for informed trading decisions. Financial markets are dynamic, and trading always carries inherent risk.






















