OPEN-SOURCE SCRIPT
Seykota Trend System

Here's a breakdown of everything the script does:
EMA Engine
Three EMAs: fast (default 15), slow (default 150), and a signal EMA (default 9) used as a confirmation layer. The 150/15 pairing mirrors Seykota's published S&P model on his TSP website. The cloud fill between fast and slow gives an instant read on trend health — teal when bullish, red when bearish.
Trailing Stop — Two Modes
ATR mode ratchets the stop upward in a long (or downward in a short) so it can never move against you. Swing mode uses the highest/lowest bar over a lookback period instead — closer to how Seykota described using support/resistance corridors in his Gold model. Switch between them in settings.
Position Sizing Output
The core Seykota formula: Units = (Account × Risk%) ÷ Stop Distance. Every entry label shows the calculated position size live on the chart. As volatility expands (wider ATR → wider stop → fewer units), the system automatically sizes down. As volatility contracts, it sizes up. This is the mechanism behind "keep bets small" — it's dynamic, not a fixed number.
ADX Filter
Seykota only wanted to be in trending markets. The ADX filter blocks signals when ADX is below your threshold (default 20), keeping the system out of choppy sideways conditions where trend-following underperforms.
Volume Filter
Optional confirmation that the move has institutional participation behind it — volume must be above its MA multiplied by a factor you control.
HUD Table
Bottom-right panel shows live: trend state, both EMAs, ATR, trailing stop level, ADX reading, risk dollars per trade, and current position size.
Alerts
Four alert conditions are wired up — long signal, short signal, trend flip to bull, trend flip to bear — ready to connect to TradingView webhooks or notifications.
Suggested starting parameters by market:
Futures/commodities: 150/15 EMA, ATR ×3.0, ADX 20
Equities (daily): 200/50 EMA, ATR ×2.5, ADX 20
Crypto (daily): 100/25 EMA, ATR ×2.0, ADX 25 (crypto is noisier)
EMA Engine
Three EMAs: fast (default 15), slow (default 150), and a signal EMA (default 9) used as a confirmation layer. The 150/15 pairing mirrors Seykota's published S&P model on his TSP website. The cloud fill between fast and slow gives an instant read on trend health — teal when bullish, red when bearish.
Trailing Stop — Two Modes
ATR mode ratchets the stop upward in a long (or downward in a short) so it can never move against you. Swing mode uses the highest/lowest bar over a lookback period instead — closer to how Seykota described using support/resistance corridors in his Gold model. Switch between them in settings.
Position Sizing Output
The core Seykota formula: Units = (Account × Risk%) ÷ Stop Distance. Every entry label shows the calculated position size live on the chart. As volatility expands (wider ATR → wider stop → fewer units), the system automatically sizes down. As volatility contracts, it sizes up. This is the mechanism behind "keep bets small" — it's dynamic, not a fixed number.
ADX Filter
Seykota only wanted to be in trending markets. The ADX filter blocks signals when ADX is below your threshold (default 20), keeping the system out of choppy sideways conditions where trend-following underperforms.
Volume Filter
Optional confirmation that the move has institutional participation behind it — volume must be above its MA multiplied by a factor you control.
HUD Table
Bottom-right panel shows live: trend state, both EMAs, ATR, trailing stop level, ADX reading, risk dollars per trade, and current position size.
Alerts
Four alert conditions are wired up — long signal, short signal, trend flip to bull, trend flip to bear — ready to connect to TradingView webhooks or notifications.
Suggested starting parameters by market:
Futures/commodities: 150/15 EMA, ATR ×3.0, ADX 20
Equities (daily): 200/50 EMA, ATR ×2.5, ADX 20
Crypto (daily): 100/25 EMA, ATR ×2.0, ADX 25 (crypto is noisier)
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.