OPEN-SOURCE SCRIPT

FlowScape Predictor

768
FlowScape Predictor is a non-repainting, regime-aware entry qualifier that turns complex market context into two readiness scores (Long & Short, each 0/25/50/75/100) and clean, confirmed-bar signals. It blends three orthogonal pillars so you act only when trend energy, momentum, and location agree:

Regime (energy): ATR-normalized linear-regression slope of a smooth HMA → EMA baseline, gated by ADX to confirm when pressure is meaningful.

Momentum (push): RSI slope alignment so price has directional follow-through, not just drift.

Structure (location): proximity to pivot-confirmed swings, scaled by ATR, so “ready” appears near constructive pullbacks—not mid-trend chases.

A soft ATR cloud wraps the baseline for context. A yellow Predictive Baseline extends beyond the last bar to visualize near-term trajectory. It is visual-only: scores/alerts never use it.

What you see

Baseline line that turns green/red when regime is strong in that direction; gray when weak.

ATR cloud around the baseline (context for stretch and pullbacks).

Scores (Long & Short, 0–100 in steps of 25) and optional “L/S” icons on bar close.

Yellow Predictive Baseline that extends to the right for a few bars (visual trajectory of the smoothed baseline).

The scoring system (simple and transparent)

Each side (Long/Short) sums four binary checks, 25 points each:

Regime aligned: trendStrong is true and LR slope sign favors that side.

Momentum aligned: RSI side (>50 for Long, <50 for Short) and RSI slope confirms direction.

Baseline side: price is above (Long) / below (Short) the baseline.

Location constructive: distance from the last confirmed pivot is healthy (ATR-scaled; not overstretched).

Valid totals are 0, 25, 50, 75, 100.

Best-quality signal: 100/0 (your side/opposite) on bar close.

Good, still valid: 75/0, especially when the missing block is only “location” right as price re-engages the cloud/baseline.

Avoid: 75/25 or any opposition > 0 in a weak (gray) regime.

The Predictive (Kalman) line — what it is and isn’t

The yellow line is a visual forward extension of the smoothed baseline to help you see the current trajectory and time pullback resumptions. It does not predict price and is excluded from scores and alerts.

How it’s built (plain English):

We maintain a one-dimensional Kalman state x as a smoothed estimate of the baseline. Each bar we observe the current baseline z.

The filter adjusts its trust using the Kalman gain K = P / (P + R) and updates:
x := x + K*(z − x), then P := (1 − K)*P + Q.

Q (process noise): Higher Q → expects faster change → tracks turns quicker (less smoothing).

R (measurement noise): Higher R → trusts raw baseline less → smoother, steadier projection.

What you control:

Lead (how many bars forward to draw).

Kalman Q/R (visual smoothness vs. responsiveness).

Toggle the line on/off if you prefer a minimal chart.

Important: The predictive line extends the baseline, not price. It’s a visual timing aid—don’t automate off it.

How to use (step-by-step)

Keep the chart clean and use a standard OHLC/candlestick chart.

Read the regime: Prefer trades with green/red baseline (trendStrong = true).

Check scores on bar close:

Take Long 100 / Short 0 or Long 75 / Short 0 when the chart shows a tidy pullback re-engaging the cloud/baseline.

Mirror the logic for shorts.

Confirm location: If price is > ~1.5 ATR from its reference pivot, let it come back—avoid chasing.

Set alerts: Add an alert on Long Ready or Short Ready; these fire on closed bars only.

Risk management: Use ATR-buffered stops beyond the recent pivot; target fixed-R multiples (e.g., 1.5–3.0R). Manage the trade with the baseline/cloud if you trail.

Best-practice playbook (quick rules)

Green light: 100/0 (best) or 75/0 (good) on bar close in a colored (non-gray) regime.

Location first: Prefer entries near the baseline/cloud right after a pullback, not far above/below it.

Avoid mixed signals: Skip 75/25 and anything with opposition while the baseline is gray.

Use the yellow line with discretion: It helps you see rhythm; it’s not a signal source.

Timeframes & tuning (practical defaults)

Intraday indices/FX (5m–15m): Demand 100/0 in chop; allow 75/0 when ADX is awake and pullback is clean.

Crypto intraday (15m–1h): Prefer 100/0; 75/0 on the first pullback after a regime turn.

Swing (1h–4h/D1): 75/0 is often sufficient; 100/0 is excellent (fewer but cleaner signals).
If choppy: raise ADX threshold, raise the readiness bar (insist on 100/0), or lengthen the RSI slope window.

What makes FlowScape different

Energy-first regime filter: ATR-normalized LR slope + ADX gate yields a consistent read of trend quality across symbols and timeframes.

Location-aware entries: ATR-scaled pivot proximity discourages mid-air chases, encouraging pullback timing.

Separation of concerns: The predictive line is visual-only, while scores/alerts are confirmed on close for non-repainting behavior.

One simple score per side: A single 0–100 readiness figure is easier to tune than juggling multiple indicators.

Transparency & limitations

Scores are coarse by design (25-point blocks). They’re a gatekeeper, not a promise of outcomes.

Pivots confirm after right-side bars, so structure signals appear after swings form (non-repainting by design).

Avoid using non-standard chart types (Heikin Ashi, Renko, Range, etc.) for signals; use a clean, standard chart.

No lookahead, no higher-timeframe requests; alerts fire on closed bars only.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.