Market Structure & Fibonacci Zones + RR
By LuxAlgoJul 6, 2026
The Market Structure & Fibonacci Zones + RR indicator provides a systematic way for traders to identify market structure breaks and potential reversal zones while automatically calculating risk and reward parameters for trade management. By combining pivot-based trend identification with golden pocket Fibonacci retracements, the tool helps traders visualize entry, stop loss, and take profit levels directly on the chart.
Usage
The indicator works by scanning price action for key pivot points to establish trend direction. When a break of structure (BOS) occurs, the script projects a specific Fibonacci zone where price action can be monitored for potential trend continuation or exhaustion.
Identifying Market Structure
The script detects bullish and bearish breaks of structure based on the selected term length. When a higher high is broken during an uptrend, or a lower low is broken during a downtrend, a BOS label and line are generated to highlight the ongoing momentum.
Fibonacci Zones
Upon a confirmed BOS, the tool plots a Fibonacci box ranging from the 50% to the 61.8% level. These zones are intended to act as points of interest where price may retrace before continuing the original trend. The zone remains active until the price interacts with it and satisfies the entry conditions.
Trade Management
Once the price enters the Fibonacci zone and confirms a setup, the script automatically draws a risk and reward box. This visual aid displays where the stop loss is placed (at the origin of the trend) and where the take profit level is set based on your specified risk to reward ratio.
Details
The script is built using Pine Script pivot functions to define significant highs and lows. It maintains an internal state to track the current trend and whether a setup has been mitigated or triggered.
- Trend Tracking: It uses pivot high and pivot low detection to determine whether the market is shifting.
- Logic Execution: Once a BOS is identified, the indicator stores the origin of the move and calculates the retracement levels (50% to 61.8%) to construct the active trading zone.
- Execution Logic: The trade is only triggered when the price returns into the Fibonacci box and shows signs of reversal (such as a candle closing in the direction of the trend), ensuring that you are entering trades with improved confirmation.
Settings
General Settings
- Market Structure Term: Determines the sensitivity of the pivot detection. Choosing Short, Mid, or Long adjusts the number of bars used to confirm a pivot point, allowing you to tailor the indicator to your specific trading timeframe.
- Show Only Valid Setups: When enabled, the indicator will clean up the chart by removing previous, non-triggered setups to keep your workspace clear for active opportunities.
- Risk/Reward Ratio: Defines the target multiplier for your trades. Setting this to 2.0, for example, will place your take profit at twice the distance of your stop loss.
Style
- Bullish Color: Customizes the visual elements for buy setups, such as BOS lines and Fibonacci boxes.
- Bearish Color: Customizes the visual elements for sell setups to help distinguish between market directions.
FAQ
How do I interpret the Fibonacci box?
The Fibonacci box represents the "Optimal Trade Entry" zone. Traders typically look for the price to pull back into this area before looking for signs of a continuation of the previous market structure break.
Can I change the sensitivity of the BOS signals?
Yes, by adjusting the Market Structure Term input, you can switch between Short, Mid, and Long settings. Short provides more frequent signals for scalping, while Long is better suited for identifying major market trends.
How to access Market Structure & Fibonacci Zones + RR?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
