logo
Developers

Trading range display with Box

Script from: TradingViewSwingTrend following

This script displays the trading range, coloring it based on profitability. It’s a reference tool and not for actual trading. To visualize current trades, use process_orders_on_close=true, calc_on_every_tick=true, max_boxes_count=500. Avoid switching strategies within the same test period to ensure accurate range display. It involves repainting and is primarily for visual testing by copying from line 22 onwards in the script.

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ Daily

4.01

Risk Reward

25.48 %

Total ROI

18

Sandisk Corporation (SNDK)

+ Trading range display with Box

@ 2 h

2.32

Risk Reward

1,552.62 %

Total ROI

36

Bloom Energy Corporation (BE)

+ Trading range display with Box

@ Daily

2.08

Risk Reward

683.17 %

Total ROI

58

PAX Gold / TetherUS (PAXGUSDT)

+ Trading range display with Box

@ Daily

2.01

Risk Reward

66.26 %

Total ROI

58

Bloom Energy Corporation (BE)

+ Trading range display with Box

@ 4 h

2.00

Risk Reward

2,902.93 %

Total ROI

114

Goldman Sachs Group, Inc. (The) (GS)

+ Trading range display with Box

@ 4 h

1.88

Risk Reward

1,181.67 %

Total ROI

379

Spotify Technology S.A. (SPOT)

+ Trading range display with Box

@ 4 h

1.85

Risk Reward

522.43 %

Total ROI

126

AST SpaceMobile, Inc. (ASTS)

+ Trading range display with Box

@ 4 h

1.57

Risk Reward

1,414.49 %

Total ROI

89

IonQ, Inc. (IONQ)

+ Trading range display with Box

@ 4 h

1.57

Risk Reward

774.49 %

Total ROI

78

ALX Oncology Holdings Inc. (ALXO)

+ Trading range display with Box

@ 4 h

1.56

Risk Reward

9.24 %

Total ROI

42

Connexa Sports Technologies Inc. (CNXA)

+ Trading range display with Box

@ Daily

1.51

Risk Reward

11.84 %

Total ROI

22

ChargePoint Holdings, Inc. (CHPT)

+ Trading range display with Box

@ Daily

1.50

Risk Reward

7.15 %

Total ROI

22

Create your account for free to see all 69+ backtests

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

Active Trades

Create your account to see on which symbols Trading range display with Box is currently trading on.

Trading range display with Box 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.

69
Backtests run
1.3
Avg profit factor
+357%
Avg net profit
+24%
Avg annualized return
53%
Avg max drawdown
0.12
Avg Sharpe ratio

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

Performance by asset class

MarketBacktestsAvg profit factorAvg net profitAvg max drawdownAvg Sharpe
Crypto891.1+478%69%0.14
Stocks1,2941.3+282%46%0.11

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