logo
Developers

Trailing Stop Snippet

Script from: TradingViewSwingMomentumTrend following

Utilize the Trailing Stop Snippet to implement dynamic stop-loss management, locking in gains while the stock rises. Activate the trailing stop at predetermined profit thresholds to secure capital at break-even or other targeted levels, customizable within your script's settings.

IonQ, Inc. (IONQ)

+ Trailing Stop Snippet

@ Daily

1.85

Profit Factor

1,045.68 %

Total ROI

89

International Business Machines Corporation (IBM)

+ Trailing Stop Snippet

@ 1 h

1.43

Profit Factor

662.08 %

Total ROI

1463

Tilray Brands, Inc. - Class 2 (TLRY)

+ Trailing Stop Snippet

@ 4 h

1.38

Profit Factor

39,299.16 %

Total ROI

240

NIFTY 50 (NIFTY)

+ Trailing Stop Snippet

@ 1 h

1.30

Profit Factor

238.61 %

Total ROI

1357

Gold Futures (GC1!)

+ Trailing Stop Snippet

@ 1 hTradeSearcher backtest

1.28

Profit Factor

363.35 %

Total ROI

1514

Ford Motor Company (F)

+ Trailing Stop Snippet

@ Daily

1.27

Profit Factor

11,009.38 %

Total ROI

853

Boeing Company (The) (BA)

+ Trailing Stop Snippet

@ 2 h

1.26

Profit Factor

1,445.37 %

Total ROI

1335

VIRTUAL / TetherUS (VIRTUALUSDT)

+ Trailing Stop Snippet

@ Daily

1.24

Profit Factor

85.02 %

Total ROI

33

Ford Motor Company (F)

+ Trailing Stop Snippet

@ Daily

1.21

Profit Factor

8,765.33 %

Total ROI

850

Mantle (MNTUSD)

+ Trailing Stop Snippet

@ 4 h

1.18

Profit Factor

1,142.13 %

Total ROI

555

NextEra Energy Partners, LP (NEP)

+ Trailing Stop Snippet

@ 4 h

1.18

Profit Factor

104.06 %

Total ROI

350

British Pound/Japanese Yen (GBPJPY)

+ Trailing Stop Snippet

@ 4 h

1.17

Profit Factor

122.24 %

Total ROI

1472

Create your account for free to see all 131+ backtests

Access filters, details, best timeframes, explore 100K+ backtests and more

Active Trades

Create your account to see on which symbols Trailing Stop Snippet is currently trading on.

Trailing Stop Snippet backtest statistics

Aggregated across every validated backtest TradeSearcher has run on this strategy. Figures update automatically as new backtests are added — they are not edited by hand. Classified as swing by holding period.

131
Backtests run
1.1
Avg profit factor
>1,000%
Avg net profit
+17%
Avg annualized return
64%
Avg max drawdown
0.12
Avg Sharpe ratio

On average, backtests of this strategy beat a buy-and-hold baseline by >1,000% over the same window.

Performance by asset class

MarketBacktestsAvg profit factorAvg net profitAvg max drawdownAvg Sharpe
Crypto891.1+906%83%0.22
Stocks1,5101.1>1,000%63%0.10
Forex1051.1+50%23%0.07

Backtests use the validated-universe filter: non-repainting scripts, over 15 trades, non-excluded. Per-market rows appear only when at least one backtest exists for that asset class.

Explore the best Trading & TradingView strategies

Stop trading blindly. Explore quality-gated backtests and improve your trading skills with data.

Start for free