OPEN-SOURCE SCRIPT

さくらんぼーいⅤ(RSI Candles対応フル版)

54
Sakuranboi V — Full RSI Candles Edition (Pine v6)

TL;DR:
A physics-inspired “Light-Cone ATR” framework with √n convergence windows, 0.5c/1.5c guide lines, and a five-factor Bias Panel. Works either on price or entirely in RSI-space, with optional RSI candles in a separate pane. Includes robust hit counting, fractal logic, and alert conditions.

What this does

Sakuranboi V visualizes volatility-scaled “world lines” from a user-defined Anchor and projects a cone using ATR. You can choose Linear n or Diffusive √n growth to shape the cone, draw 0.5c & 1.5c guide lines, and overlay periodic √n stripes (at m² steps) where pivots statistically tend to appear (“convergence windows”). A compact Bias Panel scores market context from five independent signals and surfaces UP / DOWN / NEUTRAL.

Key features

Dual Calculation Space: Toggle Use RSI as value to run all logic on RSI instead of price. Optional RSI Candles (open/high/low/close) for a clean RSI-pane workflow.

Anchor-Based Light-Cone ATR: Anchor by Time or Bars Ago; cone height scales by ATR (same TF or HTF via ATR Timeframe). Choose Close or Wick (High/Low) for cone height basis.

Guide Lines: Automatic 0.5c and 1.5c world lines as dynamic speed rails.

√n Stripes (Convergence Windows): Periodic windows at stepBars * m² from the anchor (tunable half-width). Optional center markers; background shading highlights active windows.

Fractal Hits + Table: Detects pivot highs/lows (user-set L/R). Counts how often pivots land inside each m² window and displays a running PH/PL hit table.

Five-Card Bias Panel (±1 each):

HTF Trend: EMA(20/50) cross on chosen HTF

Cone z: Normalized distance from anchor within the cone (thresholded)

Rail-Hug: % of recent bars touching 0.5c–1.0c belts (up/down)

Stripe→First Fractal: First PL/PH after entering a √n stripe

Structure Break: Close breaking the latest confirmed PH/PL
Total score ≥ +3 → UP, ≤ −3 → DOWN, else NEUTRAL.

How to use (quick start)

Set the Anchor: Pick Time (timestamp) or Bars Ago. The yellow label marks the anchor.

Choose Cone Mode: Linear n (steady projection) or Diffusive √n (slower early, faster later).

(Optional) Switch to RSI-space: Turn on Use RSI as value; enable RSI Candles if you want a pure RSI-pane workflow.

Tune Sensitivities:

ATR Length, ATR Timeframe, Multiplier

stepBars, Max Order M, Stripe Half-Width

Bias thresholds: zThresh, railLookback, railPct

Read the Bias Panel: Row-wise cards show the state and ±1 score; the bottom row shows TOTAL and direction.

Inputs at a glance

Calc Source: Price vs RSI (with RSI candles styling)

Anchor: Mode (Time/Bars Ago), anchor price (Close/High/Low/Open/Manual)

Light-Cone ATR: Length, HTF, horizon (bars), growth mode, multiplier, wick/close mode, fill/edge colors

Guides: 0.5c / 1.5c line visibility & width

√n Stripes: step, max order M, half-width, color, center lines

Fractal: Left/Right bars, PH/PL marker colors

Display/Limits: Hit table on/off, on-screen throttling, future draw limit

Bias Panel: HTF (e.g., 15m) + EMA(20/50), z-threshold, rail-lookback & ratio

Alerts (ready to use)

Bias UP — Bias score >= +3

Bias DOWN — Bias score <= -3

Fractal High in Convergence — Pivot High inside a √n stripe

Fractal Low in Convergence — Pivot Low inside a √n stripe

Notes & behavior

Repainting:

Fractals (pivot highs/lows) confirm after Right bars; once confirmed they don’t repaint.

HTF ATR and EMA are requested with lookahead_off. Current-bar values can evolve until close.

Scales: Default overlay=false to support RSI-pane workflows. If you operate strictly on price, you can display it in the main chart.

Performance: Drawing is throttled near the visible screen and capped with a future draw limit for stability.

Disclaimer: This is an educational tool, not financial advice. Trading involves risk. Always test on historical data and paper trade before using live capital.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.