01 / Overview
Key Features
20 Selectable Timeframes
Track up to 20 TF slots simultaneously. Each row shows the TF label and exact time until bar close.
Live Countdown Display
Auto-scales format: days/hours, hours/minutes, minutes/seconds, or seconds-only as time narrows.
Validity Guard
Any TF faster than your chart gets flagged in orange instead of showing a misleading countdown.
Per-TF Toggles
Enable or disable any slot independently. Disabled rows disappear — the table shrinks to only what you need.
Full Color Control
7 independent color inputs: Header, Dividers, Labels, Header Text, Table Text, Background, Borders.
9-Position Placement
Anchor the panel anywhere: Top/Middle/Bottom × Left/Center/Right.
Pixel Font Sizing
Independent px sizes for header and data rows. Range 6–36px with true per-pixel sizing (Pine v6).
Custom Panel Title
Rename the header to anything — 'Session Clocks', 'Bar Timer', or your ticker.
02 / Concept
How It Works
→ The Problem It Solves
Bar Close Timing
When you trade across multiple timeframes, knowing exactly when each candle closes matters. A daily bar closing in 4 minutes behaves very differently from one with 3 hours left. sX TF End keeps all your timeframes in one glanceable panel so you never switch charts or do mental math to check bar timing.
01
Fetch close time
For each enabled slot, request.security() fetches the time_close of the current bar on that timeframe using lookahead. This gives the exact UTC timestamp when the bar closes.
02
Validate the timeframe
The indicator checks whether the selected TF is ≥ the chart TF using timeframe.in_seconds(). Faster TFs get an orange warning row instead of a countdown.
03
Calculate remaining time
Remaining ms = time_close − timenow. The result is converted to days/hours/minutes/seconds and auto-formatted based on the magnitude.
04
Render on last bar only
The table rebuilds on barstate.islast only. Zero impact on historical bar rendering. All 20 security() calls run globally as required by Pine.
→ NoteAll 20 request.security() calls execute on every bar regardless of whether a slot is enabled. This is a Pine Script requirement. Only enabled rows appear in the table.
03 / Reference
Settings
🎨 Table Colors
| Setting | Default | Description |
|---|---|---|
| Header | #2a3049 | Background of the panel title row. |
| Dividers | #0f0f0f | Background of separator rows. |
| Labels | #2a3049 | Checkbox and label cell background. Match to Header for a clean look. |
| Header Text | #b8b8b8 | Text color in the title row. |
| Table Text | #b8b8b8 | Text color for countdown rows. |
| Table Background | #2a2a2a | Background fill for data rows. |
| Table Borders | #141414 | Color of all cell borders and the outer frame. |
⚙️ Table Settings
| Setting | Default | Range | Description |
|---|---|---|---|
| Table Size (px) | 13 | 6–36 | Font size for countdown data rows. True per-pixel sizing. |
| Header Size (px) | 13 | 6–36 | Font size for the panel title row. Independent from Table Size. |
| Table Placement | Top Right | 9 positions | Where the panel anchors on the chart. |
| Panel Title | ⏰ sX TF End | Any string | Header text. Rename to match your workflow. |
⏰ Bar Close Countdown
| Setting | Default | Range | Description |
|---|---|---|---|
| Show Bar Close Countdowns | ON | ON / OFF | Master toggle. Hides the entire table when OFF. |
| TF1 Toggle | ON | ON / OFF | Enable or disable slot 1. Disabled slots produce no row. |
| TF1 Timeframe | 60 (1H) | Any TF | Timeframe to track for slot 1. Accepts any valid TradingView TF string. |
| TF2 Toggle | ON | ON / OFF | Enable or disable slot 2. |
| TF2 Timeframe | 240 (4H) | Any TF | Timeframe to track for slot 2. |
| TF3 / TF4 | ON / D, 2D | Any TF | Daily and 2-Day countdowns. Both enabled by default. |
| TF5 / TF6 | ON / W, 2W | Any TF | Weekly and 2-Week countdowns. Both enabled by default. |
| TF7–TF20 | OFF | Any TF | Additional slots, all disabled by default. Enable as needed. Default TFs: M, 2M, 3M, 6M, M, 10m, 45m, 3H, 6H, 8H, 12H, 2D, 3D, 3M. |
04 / Reading
Reading the Table
Countdown Format
| Setting | Default | Description |
|---|---|---|
| > 24 hours | Xd Yh | Example: 2d 6h — days and hours remaining. |
| 1–24 hours | Xh Ym | Example: 4h 15m — hours and minutes remaining. |
| 1–60 minutes | Xm Ys | Example: 42m 30s — minutes and seconds. |
| Under 1 minute | Xs | Example: 28s — seconds only. |
| Bar closed | TF → closed | The bar has already printed. Waits for the next bar. |
| TF invalid | ⚠ Lower TF than chart | Orange warning. Slot TF is faster than current chart TF. |
05 / Best Practices
Pro Tips
Match Enabled TFs to Your Style
Day traders: keep 1H, 4H, D. Disable weekly+. Swing traders: 4H, D, W, 2W. Options traders playing monthlies: add M. Disable everything else for a compact panel.
Use as a Pre-Trade Timing Check
Before entering, glance at the panel. If the daily bar closes in 8 minutes, wait for the new bar to confirm direction. Entering near the bar close is one of the most common timing mistakes in STRAT trading.
Watch the Orange Warning Rows
An orange row means a slot is set faster than your chart. Change the slot TF to something larger, or lower your chart TF. Most common setup issue.
Rename the Title for Context
If you run multiple charts, rename the panel title to include the session — '⏰ ES Session' or '⏰ SPX Bar Timer'. Saved per-chart.
Use TF12 (10m) and TF13 (45m) for Scalping
Both are disabled by default. Scalpers on 10m or 30m charts can enable these for sub-hour precision.
Place It Where Other Tables Aren't
Top Right is the default. If sXMTF Trends is already there, move TF End to Bottom Right or Middle Right.
06 / Use Cases
Who Uses This
→ Day Trader
Session Bar Timing
Run with 1H, 4H, and D enabled. Before every entry, check the panel. If the daily bar closes in under 5 minutes, wait for the new bar to confirm direction. The D countdown tells you whether you have time to hold into the close or need to flatten before 4pm ET.
→ Swing Trader
Weekly Candle Awareness
Enable 4H, D, W, and 2W. The weekly countdown is the most important number for swing traders. Weekly closes above or below key levels drive trend continuation. Knowing you have 2 days left on the weekly bar helps you decide whether to hold or take profit early.
→ Options Trader
Expiration Timing
Enable D, W, and M. The daily countdown matters for 0DTE entries. The weekly countdown matters for Friday expiries. Monthly countdown matters for end-of-month positioning.
| Setting | Day Trader | Swing Trader | Options Trader |
|---|---|---|---|
| TF1 | 1H | 4H | D |
| TF2 | 4H | D | W |
| TF3 | D | W | M |
| TF4–6 | OFF | 2W, OFF, OFF | OFF |
| Placement | Top Right | Top Right | Bottom Right |
| Panel Title | ⏰ Session | ⏰ Bar End | ⏰ Expiry |
→ sXSuite IntegrationsX TF End works alongside every indicator in the suite. Pair with sXMTF Trends to know the conviction score AND time remaining on the confirmation TF. Pair with sX SBox to time entries before the bar that could print the breakout candle. Pair with sX OHLC to watch prior-period levels while tracking when the current period closes.