OPEN-SOURCE SCRIPT

SOFT Speed & Linearity Strategy (MTF) LIVE & BACKTEST

233
SOFT Speed × Linearity Strategy (MTF – LIVE & BACKTEST)

This strategy detects clean impulsive moves by combining real-time price speed with directional quality (linearity).

It is designed for intraday markets such as Gold (XAUUSD), Nasdaq, and Crypto (ETH, BTC), where acceleration quality matters more than raw indicators.

🔹 Core Concepts
1️⃣ Speed ($ per second)

Measures how fast price is moving

Expressed in $/second, not points or ticks

Two execution modes:

LIVE → real-time intra-candle speed using elapsed seconds

BACKTEST → historical approximation using (Close − Open) / candle duration

2️⃣ Linearity Score (1 → 5)

Evaluates movement quality inside the candle:

Net progress vs adverse excursion

Identifies one-way impulses vs noisy back-and-forth moves

Interpretation

1–2 → choppy / rotational

3 → acceptable

4–5 → clean impulse (higher continuation probability)

🔹 Visual Panel

Histogram bars = Speed × Linearity

Color reflects directional quality

Optional info label displays:

Execution mode (LIVE / BACKTEST)

Analysis timeframe

Linearity score

Direction

Speed ($/s)

No drawings are placed on candles.

🔹 Entry Logic

Configurable conditions:

Minimum linearity score

Minimum speed

Direction aligned with candle movement

Long / Short / Both modes

Optional cooldown between signals

⚠️ Speed thresholds are separated for LIVE and BACKTEST to reflect their different nature.

🔹 Exit Modes (Selectable)
A — Symmetric

Exit when entry conditions are no longer valid.

B — Hysteresis (default)

Exit only after controlled degradation:

Linearity falls below a lower threshold

Or speed drops below a lower threshold

C — Momentum

Exit when speed no longer supports the trade direction (speed ≤ 0).

Optional add-ons:

Exit on opposite signal

Exit on speed channel re-entry

🔹 Multi-Timeframe (MTF)

Default analysis timeframe: 15 minutes

Optional lock to chart timeframe

Safety rule for public use:

If chart timeframe < 15m, analysis remains on 15m

Prevents misleading ultra-fast recalculations

🔹 LIVE vs BACKTEST (Important)

LIVE mode uses true intra-candle acceleration

BACKTEST mode uses an approximation to allow reproducible historical testing

Results between LIVE and BACKTEST are not identical by design

This is intentional and clearly separated.

🔹 Alerts

Available alerts:

BUY

SELL

EXIT

Speed channel breakout

ALL events

Compatible with TradingView webhooks.

🔹 Intended Use

This is not a trend indicator.
This is not a prediction tool.

It is a momentum quality detector, useful to:

Validate breakouts

Filter false accelerations

Trade continuation, not anticipation

⚠️ Disclaimer

This script is for educational and research purposes only.
It does not constitute financial advice.
Always test, adapt parameters to your market, and manage risk.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.