BBBDXY-9 - Intraday/ Swing

A chart-grade USD basket that outputs full O/H/L/C candles. It combines nine FX pairs using weighted log-returns and geometric aggregation, then rescales to 100 at an anchor. You can build from 1m, 1H, 4H, or D and analyze it like a normal chart (drawings, structure, bar replay, and a clean Source output for other tools).
Why another USD gauge?
A legacy EUR-heavy USD measure can, at times, behave close to an EURUSD proxy and under-represent moves versus other majors and Asia EM. A diversified basket helps capture USD dynamics beyond EUR-centric effects. This study is independent and does not rely on third-party brands.
Basket (defaults are editable in Inputs)
Pairs used: EURUSD (inverted), USDJPY, USDCAD, GBPUSD (inverted), USDMXN, USDCNH, USDCHF, AUDUSD (inverted), USDSGD.
Inverted means the pair is flipped internally so rising values reflect USD strength. Weights default to a diversified mix and can be customized.
How it works (high level)
- Sample each component on the chosen base timeframe.
- Compute log-returns versus the anchor, multiply by weights, sum, and exponentiate (geometric combine).
- Re-scale so the index equals 100 at the anchor.
- Optional: plot an arithmetic comparison line.
Base-TF and aggregation rules
- Build from timeframe: 1m, 1H, 4H, D.
- If chart TF is greater than base TF, aggregate up from the base TF (no down-mixing).
- If chart TF equals base TF, show native base candles.
- If chart TF is lower than base TF, sample the base TF (step-like).
- For intraday precision and exact wicks, choose 1m as base and view higher TFs by aggregation.
- For longer history with fewer requests, choose 1H, 4H, or D as base.
Inputs (overview)
- Build-from TF (1m, 1H, 4H, D) and a feed prefix if your broker symbols require one.
- Per-pair weights (editable).
- Anchor date and time (chart timezone) plus optional auto-rebase to first available bar if the exact anchor is missing.
- Arithmetic comparison line (optional).
- Source output selector (Open, High, Low, Close) for downstream tools.
- Custom candle colors.
How to use
- For granular intraday structure and wick accuracy, set base TF to 1m and view higher TFs by aggregation.
- For swing and weekly context, set base TF to 1H, 4H, or D.
- Keep default weights unless you have a specific reason to alter the basket.
- Rising index suggests USD strength versus the basket; falling index suggests USD weakness.
Notes and limitations
- Depends on availability and quality of the underlying FX symbols on your data feed.
- Indicator only; no financial advice, no alerts, no orders.
- No external open-source code reused.
- Past behavior does not guarantee future results.
Figure (publication image)
Top: a legacy EUR-heavy USD index on 1H. The horizontal line marks a local swing high; price stalls and rolls over beneath it.
Bottom: this diversified USD basket on 1H. The horizontal line marks the same calendar window; the advance extends differently into that zone before rolling later.
This side-by-side illustrates that a EUR-centric gauge can diverge from a diversified USD basket. Similar divergences appear at other points; the example is illustrative and not a signal.
- riseofatrader
BBBDXY-9 – Update
What’s New
Countdown Tag on Price Line
- Shows time remaining to bar close, positioned to the right of the current price.
- Position offset in bars (not seconds): `Right offset for tag (bars)`.
- Vertical offset in ticks: `Vertical offset (ticks)` — tag sits slightly **above** the line (not on it).
- Dynamic coloring: tag/anchor color follows the last tick direction (teal for up, red for down).
- Configurable text size: `Countdown text size` (`Small`, `Normal`, `Large`).
- Clean-up logic: tag & anchor are removed when disabled or when the bar isn’t the last one.
Subtle Price-Line Anchor
- Dotted anchor line at the current price to “hold” the countdown tag to the right.
- Color automatically adapts to tick direction.
Inputs
- Show countdown tag on price line` — enable/disable.
- Right offset for tag (bars)` — horizontal spacing in **bars**.
- Vertical offset (ticks)` — vertical spacing in **ticks**.
- Countdown text size` — tag font size.
Improvements & Fixes
- Consistent **MM:SS** time formatting.
- Proper text-size mapping via `getTagSize`.
- Avoids lookahead/shadowing issues; more stable behavior across timeframes.
- UI polish: tag placed slightly above the price line by default.
Notes
- The tag appears only on the **last bar**.
- Vertical spacing scales with `syminfo.mintick`; adjust if your market has very large/small ticks.
- The last-price line can be toggled independently.
-riseofatrader
The countdown timer has been refined for higher timeframes:
W–M: xxd xxh (days and hours)
12M+: xxM xxd (months and days)
This update improves clarity and readability of the remaining time display across higher timeframes.
-riseofatrader
סקריפט להזמנה בלבד
רק משתמשים שאושרו על ידי המחבר יכולים לגשת לסקריפט הזה. תצטרך לבקש ולקבל אישור להשתמש בו. אישור זה ניתן בדרך כלל לאחר תשלום. לפרטים נוספים, בצע את ההוראות של המחבר למטה או צור קשר ישירות עם riseofatrader.
TradingView לא ממליצה לשלם עבור סקריפט או להשתמש בו, אלא אם כן אתה סומך לחלוטין על המחבר שלו ומבין איך הוא עובד. ייתכן שתמצא גם אלטרנטיבות חינמיות בקוד פתוח בסקריפטים של הקהילה שלנו.
הוראות המחבר
כתב ויתור
סקריפט להזמנה בלבד
רק משתמשים שאושרו על ידי המחבר יכולים לגשת לסקריפט הזה. תצטרך לבקש ולקבל אישור להשתמש בו. אישור זה ניתן בדרך כלל לאחר תשלום. לפרטים נוספים, בצע את ההוראות של המחבר למטה או צור קשר ישירות עם riseofatrader.
TradingView לא ממליצה לשלם עבור סקריפט או להשתמש בו, אלא אם כן אתה סומך לחלוטין על המחבר שלו ומבין איך הוא עובד. ייתכן שתמצא גם אלטרנטיבות חינמיות בקוד פתוח בסקריפטים של הקהילה שלנו.