OPEN-SOURCE SCRIPT
מעודכן MrRexo RBS

# MrRexo Setup
MrRexo Setup is an open-source market structure and setup-mapping indicator for TradingView. It combines higher-timeframe bias, previous-period levels, all-time high tracking, BOS, FVG, price GAPs, high/low moving average bands, and optional entry markers in one chart overlay.
The script is designed for a dark, technical chart layout and is intended to help traders quickly read directional context, structure breaks, imbalance zones, and potential continuation setups without stacking multiple separate indicators.
## What This Indicator Shows
MrRexo Setup focuses on several core areas:
- Higher-timeframe bias for daily, weekly, and monthly context.
- Previous day, week, and month high/low levels.
- All-time high based on the chart history available to the script.
- Break of Structure levels.
- Fair Value Gaps.
- Candle-to-candle price GAPs.
- Distance and estimated closure probability for the nearest FVG and GAP above and below price.
- Fast and slow high/low moving average bands.
- Optional LONG/SHORT setup markers based on band behavior.
## Bias Panel
The compact panel shows directional bias for:
- D - daily bias
- W - weekly bias
- M - monthly bias
Bias can be calculated using either:
- close versus previous range,
- fast/slow moving average relationship.
The panel also shows the nearest FVG and GAP distance in both directions, together with a heuristic closure probability.
## Previous-Period Levels
The indicator can draw:
- PDH - previous day high
- PDL - previous day low
- PWH - previous week high
- PWL - previous week low
- PMH - previous month high
- PML - previous month low
- ATH - all-time high from available chart history
Each group has configurable colors, labels, line style, line width, and extension behavior.
## Market Structure
Break of Structure is detected using pivot-based structure levels. BOS labels are placed directly on the structure line to keep them visually different from entry markers.
Bullish and bearish BOS colors can be configured independently.
## FVG and GAP Zones
The script detects both Fair Value Gaps and candle-to-candle price GAPs.
FVG features:
- wick or body based definition,
- minimum size in ticks,
- right extension,
- optional hide-after-fill behavior,
- configurable expiration in days,
- label with date and size in ticks.
GAP features:
- minimum size in ticks,
- right extension,
- optional hide-after-fill behavior,
- configurable expiration in days,
- label with date and size in ticks,
- partial consumption: the GAP zone shrinks as price fills it and disappears after full closure.
## Moving Average Bands
MrRexo Setup includes fast and slow high/low bands. Each band is calculated from high and low prices, not just close.
Supported average types:
- EMA
- SMA
- SMMA
- WMA
Default band settings:
- Fast band: 33
- Slow band: 144
- Band type: WMA
## Entry Markers
The indicator can show optional LONG/SHORT setup markers. These are not strategy orders and do not execute trades.
Supported signal types:
- Cross through band
- Return to band
- Bounce from band
Each entry marker is displayed as:
- L for long setups,
- S for short setups,
- a vertical line from the signal candle upward,
- a tooltip with the full signal type, such as SHORT BOUNCE F or LONG RETURN S.
Entry labels can be positioned using:
- Dynamic top
- Range top
- Fixed price
This makes it possible to keep markers visually aligned at the top of the chart.
## Default Settings
Default values are tuned for a clean, technical layout:
- Fast/slow bands: 33/144
- Band type: WMA
- Minimum FVG size: 80 ticks
- Minimum GAP size: 150 ticks
- FVG/GAP expiration: 14 days
- Entry signal spacing: 15 minutes
- Bias background: disabled by default
- GAP and FVG zones: extended to the right by default
All key colors, labels, line widths, visibility toggles, and zone settings can be adjusted from the indicator settings panel.
## Important Notes
This is an indicator, not a strategy. It does not place orders, run backtests, or provide financial advice.
ATH is calculated from the historical data available to the script on the current TradingView chart. It may differ depending on symbol type, chart history, futures contract settings, continuous contract adjustments, and available data.
The closure probability shown for GAPs and FVGs is a heuristic model based on distance and zone age. It is not a statistical guarantee.
Use this tool as part of a broader trading plan, with your own confirmation process and risk management.
## Suggested Tags
market structure, bias, BOS, FVG, gap, price action, support resistance, trend, WMA, EMA, multi timeframe, liquidity, trading setup
MrRexo Setup is an open-source market structure and setup-mapping indicator for TradingView. It combines higher-timeframe bias, previous-period levels, all-time high tracking, BOS, FVG, price GAPs, high/low moving average bands, and optional entry markers in one chart overlay.
The script is designed for a dark, technical chart layout and is intended to help traders quickly read directional context, structure breaks, imbalance zones, and potential continuation setups without stacking multiple separate indicators.
## What This Indicator Shows
MrRexo Setup focuses on several core areas:
- Higher-timeframe bias for daily, weekly, and monthly context.
- Previous day, week, and month high/low levels.
- All-time high based on the chart history available to the script.
- Break of Structure levels.
- Fair Value Gaps.
- Candle-to-candle price GAPs.
- Distance and estimated closure probability for the nearest FVG and GAP above and below price.
- Fast and slow high/low moving average bands.
- Optional LONG/SHORT setup markers based on band behavior.
## Bias Panel
The compact panel shows directional bias for:
- D - daily bias
- W - weekly bias
- M - monthly bias
Bias can be calculated using either:
- close versus previous range,
- fast/slow moving average relationship.
The panel also shows the nearest FVG and GAP distance in both directions, together with a heuristic closure probability.
## Previous-Period Levels
The indicator can draw:
- PDH - previous day high
- PDL - previous day low
- PWH - previous week high
- PWL - previous week low
- PMH - previous month high
- PML - previous month low
- ATH - all-time high from available chart history
Each group has configurable colors, labels, line style, line width, and extension behavior.
## Market Structure
Break of Structure is detected using pivot-based structure levels. BOS labels are placed directly on the structure line to keep them visually different from entry markers.
Bullish and bearish BOS colors can be configured independently.
## FVG and GAP Zones
The script detects both Fair Value Gaps and candle-to-candle price GAPs.
FVG features:
- wick or body based definition,
- minimum size in ticks,
- right extension,
- optional hide-after-fill behavior,
- configurable expiration in days,
- label with date and size in ticks.
GAP features:
- minimum size in ticks,
- right extension,
- optional hide-after-fill behavior,
- configurable expiration in days,
- label with date and size in ticks,
- partial consumption: the GAP zone shrinks as price fills it and disappears after full closure.
## Moving Average Bands
MrRexo Setup includes fast and slow high/low bands. Each band is calculated from high and low prices, not just close.
Supported average types:
- EMA
- SMA
- SMMA
- WMA
Default band settings:
- Fast band: 33
- Slow band: 144
- Band type: WMA
## Entry Markers
The indicator can show optional LONG/SHORT setup markers. These are not strategy orders and do not execute trades.
Supported signal types:
- Cross through band
- Return to band
- Bounce from band
Each entry marker is displayed as:
- L for long setups,
- S for short setups,
- a vertical line from the signal candle upward,
- a tooltip with the full signal type, such as SHORT BOUNCE F or LONG RETURN S.
Entry labels can be positioned using:
- Dynamic top
- Range top
- Fixed price
This makes it possible to keep markers visually aligned at the top of the chart.
## Default Settings
Default values are tuned for a clean, technical layout:
- Fast/slow bands: 33/144
- Band type: WMA
- Minimum FVG size: 80 ticks
- Minimum GAP size: 150 ticks
- FVG/GAP expiration: 14 days
- Entry signal spacing: 15 minutes
- Bias background: disabled by default
- GAP and FVG zones: extended to the right by default
All key colors, labels, line widths, visibility toggles, and zone settings can be adjusted from the indicator settings panel.
## Important Notes
This is an indicator, not a strategy. It does not place orders, run backtests, or provide financial advice.
ATH is calculated from the historical data available to the script on the current TradingView chart. It may differ depending on symbol type, chart history, futures contract settings, continuous contract adjustments, and available data.
The closure probability shown for GAPs and FVGs is a heuristic model based on distance and zone age. It is not a statistical guarantee.
Use this tool as part of a broader trading plan, with your own confirmation process and risk management.
## Suggested Tags
market structure, bias, BOS, FVG, gap, price action, support resistance, trend, WMA, EMA, multi timeframe, liquidity, trading setup
הערות שחרור
v0.5.0The visible indicator title no longer includes the revision number. The script revision is now kept only inside the source code comment for cleaner publication naming.
Updated alert messages and publication description to match the new MrRexo RBS name.
הערות שחרור
v0.6.3 update notesChanges since v0.5.0:
- Added Current Day High/Low levels:
- CDH - Current Day High
- CDL - Current Day Low
- configurable visibility, line/label color, and label text color.
- Added Session Fibonacci:
- separate Fibonacci levels for Sydney, Tokyo, London, and New York sessions,
- 0% anchored at the session open,
- 100% calculated from the session open to the current session high or current session low,
- typical levels: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%,
- session-specific enable switches, session hours, and colors,
- shared timezone, label, width, and style settings,
- Fibonacci lines stop extending after the configured session ends,
- Fibonacci labels are placed at the session start and refreshed on top of other objects.
- Improved Session Fibonacci behavior:
- Fibonacci no longer uses full-day CDH/CDL as the target.
- Each session now tracks its own current session high and current session low.
- Labels were moved to the left side of the session start.
- Labels are refreshed after FVG/GAP drawings so they stay visually above other objects.
- Reorganized the settings panel:
- added a top-level Visibility section,
- moved the main show/hide switches to the top of the configuration panel,
- kept detailed color, style, length, and logic settings in their original sections.
- Updated default visibility settings:
- EMA stack disabled by default,
- entry signals disabled by default,
- previous month levels disabled by default,
- Session Fibonacci enabled by default,
- Sydney and Tokyo Fibonacci disabled by default,
- London and New York Fibonacci enabled by default,
- FVG disabled by default,
- GAPs, BOS, current day levels, previous day/week levels, ATH, and H/L bands remain enabled by default.
- Fixed Unicode arrow rendering:
- restored proper arrows in the bias panel, BOS labels, FVG/GAP labels, and distance panel rows.
- Maintenance:
- resolved Pine consistency warnings related to historical functions,
- kept compilation clean with no errors and no warnings.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.