OPEN-SOURCE SCRIPT
Diupdate

Renko Timekeeper

59
Renko charts delete time. This tool puts it back.The Renko Timekeeper prints a number next to every brick telling you exactly how many minutes that specific brick took to form.This converts a "Static Chart" into a "Velocity Chart." It allows you to spot Momentum Decay before the price actually reverses.1. The Visual GuideThe indicator prints a single number (e.g., 4.2) above or below every brick.Text ColorValue RangeEngineering StateInterpretationGREEN< 5.0High VelocityThe "Turbo" is on. Buyers/Sellers are aggressive. HOLD or ADD to the trade.GRAY5.0 – 15.0Normal CruiseThe trend is stable. Standard market breathing. HOLD.RED> 15.0STALL (Warning)The engine has died. The market is struggling to push price. EXIT immediately.
Catatan Rilis
# Renko Timekeeper

## What It Is

Renko Timekeeper is a **Renko-specific overlay indicator** that solves two problems standard charts don't have: Renko bricks have no native sense of time, and choosing the right brick size requires accounting for real volatility and trading costs. This indicator adds both — a real-time clock for every brick and an ATR-based brick sizing engine with built-in cost awareness for forex.

---

## What It Does

### 🧱 Physics Engine — Dynamic Brick Sizing
Calculates the optimal Renko brick size in pips using ATR from **real time-based candles** (not synthetic Renko OHLC). It factors in your actual trading costs — spread and commission — and enforces a minimum brick size so you never trade a brick smaller than your cost basis.

The HUD displays the recommended brick size and a real-time system status:
- **SYSTEM READY** (blue) — Volatility exceeds your cost basis. Good to trade.
- **COST ADJUSTED** (orange) — Volatility is too low; brick size has been clamped up to your break-even cost floor.
- **SPREAD HAZARD** (red) — Volatility is below the minimum safe threshold. Consider sitting out.

### ⏱ Timekeeper — Brick Duration Labels
Each confirmed Renko brick is labeled with the time (in minutes) it took to form. Color-coded:
- 🟢 **Green** — Fast brick (< 5 min). High momentum.
- ⚪ **Gray** — Normal pace.
- 🔴 **Red** — Stalled brick (exceeds your configurable threshold). Momentum has dried up.

### 🔴 Live Brick Age
A floating label on the current unconfirmed brick shows a live `HH:MM:SS` stopwatch of how long the current brick has been forming. Tooltip shows tick accumulation and tick intensity (ticks/sec). The label turns red when the current brick exceeds the stall threshold.

### 🚨 Stall Alert
Built-in `alertcondition` fires when any brick exceeds your stall threshold, so you can set TradingView alerts for momentum death.

---

## Inputs

### Physics Engine
| Input | Default | Description |
|---|---|---|
| **Show HUD** | ✅ On | Toggle the brick sizing HUD table |
| **HUD Position** | Bottom Left | Screen position for the HUD |
| **Base Chart Resolution** | 1s | Reserved for future tick-counting logic |
| **Volatility Timeframe** | 5m | Timeframe used for ATR calculation (fetches real candles, not Renko) |
| **ATR Length** | 14 | Lookback period for ATR |
| **Sizing Logic** | Half Candle | `Half Candle` = ATR × 0.5 (scalping). `Full Candle` = ATR × 1.0 (conservative) |

### Forex Cost Basis
| Input | Default | Description |
|---|---|---|
| **Average Spread (Pips)** | 0.5 | Your broker's typical spread for the pair |
| **Commission ($ per Lot)** | 5.0 | Round-trip commission per standard lot |
| **Pip Value ($ per Lot)** | 10.0 | Dollar value of 1 pip per lot (10 for most pairs, ~6.5–7 for JPY crosses) |
| **Min Safe Brick (Pips)** | 2.0 | Minimum brick size you consider tradeable — below this triggers SPREAD HAZARD |

### Timekeeper
| Input | Default | Description |
|---|---|---|
| **Show Time Labels** | ✅ On | Toggle brick duration labels on chart |
| **Stall Threshold (Minutes)** | 15 | Minutes before a brick is considered stalled (triggers red label + alert) |

### Display
| Input | Default | Description |
|---|---|---|
| **Hide Faster Than (Min)** | 0.0 | Filter out labels on bricks that formed faster than this (declutter fast markets) |
| **Text Size** | Small | Label font size |
| **Text Side** | Right | Place labels to the right or left of the brick |
| **Horizontal Gap** | 20 | Spacing (in characters) between the brick and the label |

---

## How to Use It

1. **Apply to a Renko chart.** This indicator is designed exclusively for Renko charts — it will not produce meaningful output on time-based or range charts.

2. **Set your cost basis.** Enter your broker's spread, commission, and pip value in the Forex Cost Basis group. These are critical — the engine uses them to determine whether current volatility supports profitable trading.

3. **Read the HUD.** The recommended brick size is displayed in the bottom-left (or wherever you position it). Use this value when configuring your Renko chart's brick size in TradingView's chart settings.

4. **Watch the time labels.** Green = momentum. Gray = normal. Red = stall. If you see a cluster of red bricks, the market is ranging or dead — tighten up or step away.

5. **Set a stall alert.** Right-click the indicator → Add Alert → select "Stall Detected". You'll be notified when any brick exceeds your stall threshold, even if you're not watching the chart.

6. **Tune the filter.** In fast-moving sessions (London open, NFP), you may get dozens of sub-minute bricks. Use "Hide Faster Than" to suppress labels on bricks that formed in under X minutes to keep the chart clean.

---

## Technical Notes

- ATR is calculated from **standard time-based candles** via `ticker.standard()`, not from Renko-transformed prices. This ensures the volatility reading reflects real market movement.
- JPY pairs are auto-detected and pip size adjusts accordingly (0.01 vs 0.0001).
- The cost floor logic uses `math.ceil()` so the brick size is always rounded up to the next whole pip when cost-adjusted.
- Live brick age updates on every tick. The tooltip's "INTENSITY" metric (ticks/sec) gives you a real-time read on order flow density.
- Max label count is 500 (TradingView platform limit). On very active charts, older labels will be recycled.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.