Tradehook — Trading Automation Service
mediumTechnical Indicator

BOSFibAlgo

The BOSFib Algorithm combines Smart Money Concept (SMC) analysis with Fibonacci retracements for high-probability trade entries. The system identifies Break of Structure (BOS) events and then waits for price to retrace to key Fibonacci levels before entering in the direction of the break.

TradingView Preview
See this algorithm in action on real charts
BOSFibAlgo TradingView chart
Performance Metrics
Historical backtesting results
53.2%
Win Rate
1.10
Profit Factor
21.6%
Max Drawdown
$73
Avg Trade
Based on 361 trades

About This Algorithm

BREAK OF STRUCTURE + FIBONACCI

Quick Facts:

  • Category: Market Structure / Smart Money
  • Markets: All markets
  • Timeframes: 15min, 1H, 4H, Daily

Overview

The BOSFib Algorithm combines Smart Money Concept (SMC) analysis with Fibonacci retracements for high-probability trade entries. The system identifies Break of Structure (BOS) events and then waits for price to retrace to key Fibonacci levels before entering in the direction of the break.

This approach captures institutional order flow while providing optimal entry points with defined risk.


How It Works

SWING STRUCTURE DETECTION Identify market structure using pivot points:

  • swingHigh = ta.pivothigh(high, swingLookback, swingLookback)
    • swingLow = ta.pivotlow(low, swingLookback, swingLookback)
    • Track last and previous swing levels

BREAK OF STRUCTURE (BOS) Detect when price breaks significant structure:

  • Bullish BOS: Price breaks above last swing high
    • Bearish BOS: Price breaks below last swing low
    • Confirmation mode: Wick or Close break
    • Minimum BOS distance filter (ATR-based)

FIBONACCI RETRACEMENT After BOS, calculate retracement levels:

Bullish BOS:

  • Range: Last swing low to BOS high
    • 38.2%, 50%, 61.8%, 78.6% retracement levels

Bearish BOS:

  • Range: Last swing high to BOS low
    • 38.2%, 50%, 61.8%, 78.6% retracement levels

ENTRY AT FIB LEVELS Wait for price to retrace to selected Fib level:

  • Long: After bullish BOS, price retraces to Fib level and bounces
    • Short: After bearish BOS, price retraces to Fib level and rejects

EXPIRATION LOGIC BOS setups expire if:

  • Price reaches opposite extreme (trend failure)
    • Too many bars pass without Fib touch
    • New BOS in opposite direction occurs

Key Parameters

STRUCTURE DETECTION:

  • swingLookback (5): Bars on each side for swing detection
    • bosConfirmation ("Close"): "Wick" or "Close" for BOS confirmation
    • minBOSDistance (0.5): Minimum break distance as ATR ratio

FIBONACCI:

  • fibLevel (61.8): Primary Fib level for entry
    • useFib382 (true): Enable 38.2% level
    • useFib50 (true): Enable 50% level
    • useFib618 (true): Enable 61.8% level
    • useFib786 (false): Enable 78.6% level

ENTRY:

  • entryConfirmation ("Rejection"): "Touch" or "Rejection" at Fib
    • maxBarsAfterBOS (20): Expiration for BOS setup

Best Use Cases

✅ SMART MONEY trading following institutional footprints ✅ TREND CONTINUATION after structural breaks ✅ PRECISION ENTRIES at key retracement levels ✅ MULTI-TIMEFRAME ANALYSIS (structure on higher TF, entry on lower)

Customer Reviews

No reviews yet. Be the first to review this algorithm!
Technical Indicator
Requires Technical Indicator Plan

Subscribe to Technical Indicator or higher to access

Subscription Access

Get access to this indicator/strategy on TradingView through our invite-only system. Your TradingView account will be granted access.

One-Time Purchase

Own the complete Pine Script source code forever. Modify, customize, and use it on your own TradingView account.

$1,500
Subscribe to any tier to unlock one-time purchases

What you get with source code:

  • Complete Pine Script v5 source code
  • Lifetime ownership - no recurring fees
  • Full customization rights
  • Use on your own TradingView account
PlatformTradingView
Subscription AccessTradingView Invite
One-Time PurchaseSource Code
LicensePersonal Use

We Value Your Privacy

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies. Read our Privacy Policy for more information.