OPEN-SOURCE SCRIPT
SOFT Speed & Linearity Strategy (MTF) LIVE & BACKTEST

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.
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.