Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

Simple RSI strategy

A Pine Script v4 strategy built on RMA or Change (max(change(src), 0), 5), Highest (high, p) and Lowest (low, p). It has 14 order rules, 7 entries among them, and trades long only with the default settings. Exits use a stop loss and a profit target. Each trade commits 20% of equity and pays 0.075% commission. 5 settings; defaults include Over Bought 80, Over Sold 25 and RSI Length 5.

Generated from the script's code by a template: every clause is a fact read from the source. Not written by a person or a model, and not taken from the author's description.

Does Simple RSI strategy repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 45 of 45 trades.
How did Simple RSI strategy do on BTCUSDT 1D with default settings?
−10.98%
From 26 Jan 2024 to 21 Oct 2026, over 119 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Can Simple RSI strategy be converted to Pine Script v5?
Yes
The upgrade takes 1 step, from v4; each was run before and after on the same candles with identical results, and the v5 script can be downloaded below.
Does Simple RSI strategy use a stop loss?
Yes
strategy.exit sets a stop on line 63, 64, 65, 66, 67, 68, 69.
Does Simple RSI strategy run in Zeal Terminal?
Yes
It compiles in 21 ms and runs 1,000 bars in 52 ms, in the browser.

BTCUSDT · 1D · default settings

  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • Plot
  • Plot
  • Plot
  • Plot
  • Winning trade
  • Losing trade
  • Equity
Prerendered with the defaults. Change anything and run it here. The script runs in your browser.
Settings (5)
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOctHLine$8,902$20,253Equity from $10,000
Binance BTCUSDT 1D candles, 26 Jan 2024 to 21 Oct 2026, 1,000 bars, default settings. Triangles mark entries; circles mark exits. Lines are what the script plots.
Net profit
−10.98%
−$1,097.71
Buy and hold
+102.5%
same period
Closed trades
119
81 won · 38 lost
Profitable
68.1%
of closed trades
Profit factor
0.78
gross profit ÷ gross loss
Max drawdown
24.44%
−$2,572.03

One run with the author's default settings, $10,000 starting capital, commission as the script sets it. A single backtest says little about future results and is not a recommendation. Backtests are simulations on historical data and are not investment advice.

Review

What a careful reader of this script would point out, found by checking the source and the backtest.

  • Note

    4 settings have no label

    In the settings dialog OverBought (line 7), OverSold (line 8), ProfitTarget_Percent (line 49), LossTarget_Percent (line 52) show an empty name. The labels on this page come from the variable names.

  • Note

    No slippage

    Fills are assumed at the exact open price. Add slippage in the properties for a more realistic test.

  • Note

    Uses an argument v6 removed

    when = on line 55, 56, 57, 58, 59, 60, 61. The upgraded version below moves each call inside an if block.

  • Note

    Uses transp =, which v5 removed line 14

    transp = on line 14. v5 folds the transparency into the colour with color.new(c, transp).

Upgrade and export

Written in Pine Script v4. The upgrade to v5 takes 1 step, one per version, each applied to the result of the one before. A last clean-v5 pass then types the settings and moves when = into if blocks, which v6 requires. Every step runs before and after on the same candles in Zeal Terminal's engine; a step whose results differ is shown but not offered as a download. Upgrades preserve behaviour: bugs are fixed in the Review, never silently here.

  • Upgrading to v5 renames rma → ta.rma, max → math.max, change → ta.change, min → math.min, highest → ta.highest, lowest → ta.lowest.
  • 7 strategy calls use the when = argument (line 55, 56, 57, 58, 59, 60, 61). It is deprecated in v5 and removed in v6, where each call moves inside an if block.

v4 → v5

Verified

Same 119 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.

  • Line 1: //@version=4 → //@version=5
  • Line 14: transp = 98 → color.new(color.purple, 98)
  • Line 17: rma → ta.rma
  • Line 17: max → math.max
  • Line 17: change → ta.change
  • Line 18: rma → ta.rma
4 more edits
  • Line 18: min → math.min
  • Line 18: change → ta.change
  • Line 22: highest → ta.highest
  • Line 23: lowest → ta.lowest
-//@version=4+//@version=5// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/⋯//band50 = hline(50, color=black, linewidth=1)-fill(band1, band0, color=color.purple, transp=98)+fill(band1, band0, color=color.new(color.purple, 98))src = closelen = input(5, minval=1, title="RSI Length")-up = rma(max(change(src), 0), len)+up = ta.rma(math.max(ta.change(src), 0), len)-down = rma(-min(change(src), 0), len)+down = ta.rma(-math.min(ta.change(src), 0), len)rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)⋯//scale-hh = highest(high, p)+hh = ta.highest(high, p)-ll = lowest(low, p)+ll = ta.lowest(low, p)scale = hh - ll⋯

Clean v5

VerifiedDownload the v5 script

Same 119 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.

  • Line 7: input() → input.int()
  • Line 8: input() → input.int()
  • Line 16: input() → input.int()
  • Line 49: input() → input.int()
  • Line 52: input() → input.int()
  • Line 55: when = strategy.opentrades == 0 and longsignal → if block
6 more edits
  • Line 56: when = strategy.opentrades == 1 and longsignal → if block
  • Line 57: when = strategy.opentrades == 2 and longsignal → if block
  • Line 58: when = strategy.opentrades == 3 and longsignal → if block
  • Line 59: when = strategy.opentrades == 4 and longsignal → if block
  • Line 60: when = strategy.opentrades == 5 and longsignal → if block
  • Line 61: when = strategy.opentrades == 6 and longsignal → if block
⋯look = 0-OverBought = input(80, minval=50)+OverBought = input.int(80, minval=50)-OverSold = input(25, maxval=50)+OverSold = input.int(25, maxval=50)bandmx = hline(100)⋯src = close-len = input(5, minval=1, title="RSI Length")+len = input.int(5, minval=1, title="RSI Length")up = ta.rma(math.max(ta.change(src), 0), len)⋯//set take profit-ProfitTarget_Percent = input(3)+ProfitTarget_Percent = input.int(3)Profit_Ticks = close * (ProfitTarget_Percent / 100) / syminfo.mintick//set take profit-LossTarget_Percent = input(10)+LossTarget_Percent = input.int(10)Loss_Ticks = close * (LossTarget_Percent / 100) / syminfo.mintick//Order Placing-strategy.entry("Entry 1", strategy.long, when=strategy.opentrades == 0 and longsignal)+if strategy.opentrades == 0 and longsignal+    strategy.entry("Entry 1", strategy.long)-strategy.entry("Entry 2", strategy.long, when=strategy.opentrades == 1 and longsignal)+if strategy.opentrades == 1 and longsignal+    strategy.entry("Entry 2", strategy.long)-strategy.entry("Entry 3", strategy.long, when=strategy.opentrades == 2 and longsignal)+if strategy.opentrades == 2 and longsignal+    strategy.entry("Entry 3", strategy.long)-strategy.entry("Entry 4", strategy.long, when=strategy.opentrades == 3 and longsignal)+if strategy.opentrades == 3 and longsignal+    strategy.entry("Entry 4", strategy.long)-strategy.entry("Entry 5", strategy.long, when=strategy.opentrades == 4 and longsignal)+if strategy.opentrades == 4 and longsignal+    strategy.entry("Entry 5", strategy.long)-strategy.entry("Entry 6", strategy.long, when=strategy.opentrades == 5 and longsignal)+if strategy.opentrades == 5 and longsignal+    strategy.entry("Entry 6", strategy.long)-strategy.entry("Entry 7", strategy.long, when=strategy.opentrades == 6 and longsignal)+if strategy.opentrades == 6 and longsignal+    strategy.entry("Entry 7", strategy.long)if strategy.position_size > 0⋯

Does it run in Pine Script v6?

No

The v6 version runs in Zeal Terminal's engine, but its results differ from the v5 version: Trades differ: 119 before, 119 after on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine. It is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

-//@version=5+//@version=6// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/⋯

Settings

Every input the script declares, with its default and what it feeds. Bounds are the ones the script enforces.

SettingDefaultType and rangeFeeds
Over Bought (no label in the script)80int · min 50band1 hline
Over Sold (no label in the script)25int · max 50band0 long golong hline
RSI Length5int · min 1up down
Profit Target Percent (no label in the script)3intProfit_Ticks
Loss Target Percent (no label in the script)10intLoss_Ticks

What it calculates

  • RMA / Change (rma, ta.rma in v5)max(change(src), 0), RSI Length (5)up · line 17
  • RMA / Change (rma, ta.rma in v5)-min(change(src), 0), RSI Length (5)down · line 18
  • Highest (highest, ta.highest in v5)high, phh · line 22
  • Lowest (lowest, ta.lowest in v5)low, pll · line 23

Signal flow

How price data and settings reach the orders. Each box is a name in the script, or several computed the same way; each arrow is a value one of them reads. Hover a box for its members.

lenRSI Lengthsetting · 5highhighprice datalowlowprice dataclosecloseprice dataopenopenprice dataOverSoldOver Soldsetting · 25ProfitTarget_PercentProfit Target Percentsetting · 3LossTarget_PercentLoss Target Percentsetting · 10OverBoughtOver Boughtsetting · 80upRMA / Change→ updownRMA / Change→ downhhHighest→ hhllLowest→ llsrcsrcvaluersirsivaluescalescalevaluedynodynovaluedynldynlvaluedynhdynhvaluedyncdyncvaluecolor_1color_1valuelong, golonglong · golong2 valueslongsignallongsignalvalueProfit_TicksProfit_TicksvalueLoss_TicksLoss_Ticksvalueentry:Entry 1Open Entry 1strategy.entryentry:Entry 2Open Entry 2strategy.entryentry:Entry 3Open Entry 3strategy.entryentry:Entry 4Open Entry 4strategy.entryentry:Entry 5Open Entry 5strategy.entryentry:Entry 6Open Entry 6strategy.entryentry:Entry 7Open Entry 7strategy.entryexit:Exit 1exit Exit 1strategy.exitexit:Exit 2exit Exit 2strategy.exitexit:Exit 3exit Exit 3strategy.exitexit:Exit 4exit Exit 4strategy.exitexit:Exit 5exit Exit 5strategy.exitexit:Exit 6exit Exit 6strategy.exitexit:Exit 7exit Exit 7strategy.exithline:9hlinehlinehline:10hlinehlinehline:11hlinehlinehline:12hlinehlinefill:14Fillfillhline:33hlinehlinehline:34hlinehlinehline:35hlinehlinehline:36hlinehlinehline:37hlinehlineplotcandle:38Candleplotcandleplot:39plotplotplot:40plotplotplot:41plotplotplot:42plotplot

Order rules

OrderFires whenBy defaultLine
Open Entry 1 longstrategy.opentrades == 0 and longsignalOn55
Open Entry 2 longstrategy.opentrades == 1 and longsignalOn56
Open Entry 3 longstrategy.opentrades == 2 and longsignalOn57
Open Entry 4 longstrategy.opentrades == 3 and longsignalOn58
Open Entry 5 longstrategy.opentrades == 4 and longsignalOn59
Open Entry 6 longstrategy.opentrades == 5 and longsignalOn60
Open Entry 7 longstrategy.opentrades == 6 and longsignalOn61
Exit Exit 1 stop and limitstrategy.position_size > 0On63
Exit Exit 2 stop and limitstrategy.position_size > 0On64
Exit Exit 3 stop and limitstrategy.position_size > 0On65
Exit Exit 4 stop and limitstrategy.position_size > 0On66
Exit Exit 5 stop and limitstrategy.position_size > 0On67
Exit Exit 6 stop and limitstrategy.position_size > 0On68
Exit Exit 7 stop and limitstrategy.position_size > 0On69

Each order is guarded by the setting shown. “Off” orders never fire unless that setting is switched on.

Does it repaint?

No

No repainting patterns in the source, and the live replay matched history.

45/45trades identical when replayed liveThe last 300 bars, from 26 Dec 2025, were fed to the engine as live ticks, four per bar, and compared with the historical run. Orders are decided once per closed bar, so nothing can change mid-bar.
  • ClearHigher-timeframe dataThe script requests no other symbol or timeframe.
  • ClearFuture-bar referencesNo negative history offsets such as close[-1].
  • ClearIntrabar recalculationNo varip, calc_on_every_tick or realtime-only state. Orders are decided once per closed bar.
  • ClearOrder timingOrders fill at the next bar's open, after the signal bar has closed.

The checks read the source; the replay runs it. Together they catch the common causes, not every possible one.

Other markets

The same script with default settings on 8 Binance markets. Each row is a separate backtest over the most recent 1,000 bars.

MarketNetBuy and holdTradesWonProfit factorMax drawdownPeriod
BTCUSDT 1D−11.0%+102.5%11968%0.7824.4%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h+2.6%+5.5%9274%1.1221.4%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+0.8%+9.8%14871%1.0122.2%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−17.1%+8.4%10869%0.5529.8%8 May 2026 – 21 Oct 2026
SOLUSDT 1D+12.9%+16.7%13370%1.2714.4%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h−11.8%+21.5%11460%0.6728.9%8 May 2026 – 21 Oct 2026
BNBUSDT 1D+13.3%+148.3%11372%1.4613.6%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h+4.3%+17.1%9179%1.2215.9%8 May 2026 – 21 Oct 2026

Backtests are simulations on historical data and are not investment advice.

The trades

By market direction

At entry, last 90 barsTradesWonP&L
Rising market1995%$807.82
Sideways market6363%−$953.70
Falling market3762%−$951.83

Rising and falling mean the market moved more than 15% over the 90 bars before entry.

How bad could the drawdown be?

20.6%

The 95th percentile of the worst drawdown when the same 119 trades are reshuffled 5,000 times. The bar spans the 5th to 95th percentile, 11.6% to 20.6%; the tick is what actually happened, 21.9%. Order luck alone moves it this much.

0%25%
All 119 trades
SideEntryExitBarsP&L
long14 Apr 2024 63,924.5015 Apr 2024 65,894.401$58.54
long18 Apr 2024 61,277.4019 Apr 2024 63,470.101$68.86
long1 May 2024 60,672.003 May 2024 60,136.802−$20.88
long2 May 2024 58,365.003 May 2024 60,136.801$1.77
long2 May 2024 58,365.003 May 2024 60,832.401$79.33
long3 May 2024 59,060.603 May 2024 60,832.400$1.34
long3 May 2024 59,060.603 May 2024 62,443.800$109.82
long15 Jun 2024 66,044.0024 Jun 2024 59,723.009−$199.93
long19 Jun 2024 65,175.3024 Jun 2024 58,854.305−$201.99
long20 Jun 2024 64,974.4024 Jun 2024 58,653.404−$202.33
long21 Jun 2024 64,870.0024 Jun 2024 58,549.003−$202.42
long22 Jun 2024 64,143.6025 Jun 2024 62,102.103−$66.34
long22 Jun 2024 64,143.604 Jul 2024 58,122.7012−$3.52
long25 Jun 2024 60,293.304 Jul 2024 58,122.709−$70.16
long5 Jul 2024 57,050.006 Jul 2024 58,327.701$39.02
long6 Jul 2024 56,628.806 Jul 2024 58,327.700$0.31
long6 Jul 2024 56,628.8010 Jul 2024 58,748.904$66.62
long3 Aug 2024 61,498.305 Aug 2024 55,682.202−$181.46
long4 Aug 2024 60,698.005 Aug 2024 54,881.901−$183.31
long5 Aug 2024 58,161.005 Aug 2024 52,344.900−$187.98
long6 Aug 2024 54,018.807 Aug 2024 56,022.001$63.28
long8 Aug 2024 55,133.809 Aug 2024 61,686.001$210.16
long2 Sep 2024 57,301.803 Sep 2024 59,132.101$55.80
long7 Sep 2024 53,963.009 Sep 2024 55,609.102$53.49
long8 Sep 2024 54,160.909 Sep 2024 55,807.001$53.31
long2 Oct 2024 60,804.904 Oct 2024 62,471.902$48.34
long3 Oct 2024 60,649.304 Oct 2024 62,471.901$0.10
long3 Oct 2024 60,649.306 Oct 2024 62,627.503$57.90
long23 Dec 2024 95,186.3024 Dec 2024 97,727.901$47.55
long24 Dec 2024 94,881.5024 Dec 2024 97,727.900$0.13
long24 Dec 2024 94,881.5024 Dec 2024 98,032.700$59.64
long3 Feb 2025 97,700.604 Feb 2025 101,329.001$67.99
long25 Feb 2025 91,552.9026 Feb 2025 82,684.801−$189.03
long26 Feb 2025 88,680.4027 Feb 2025 86,777.601−$43.84
long27 Feb 2025 84,250.1027 Feb 2025 86,777.600$1.44
long27 Feb 2025 84,250.1028 Feb 2025 80,209.501−$89.72
long28 Feb 2025 84,708.602 Mar 2025 86,931.902$46.12
long28 Feb 2025 84,708.602 Mar 2025 87,290.502$0.39
long1 Mar 2025 84,349.902 Mar 2025 87,290.501$61.91
long11 Mar 2025 78,595.9012 Mar 2025 82,933.001$100.88
long7 Apr 2025 78,430.008 Apr 2025 80,804.901$54.66
long9 Apr 2025 76,322.4010 Apr 2025 82,615.201$154.64
long6 Jun 2025 101,509.007 Jun 2025 104,637.001$56.92
long22 Jun 2025 102,120.0023 Jun 2025 103,993.001$32.88
long23 Jun 2025 100,964.0023 Jun 2025 103,993.000$0.50
long23 Jun 2025 100,964.0023 Jun 2025 105,149.000$77.12
long2 Aug 2025 113,298.007 Aug 2025 115,996.005$44.06
long3 Aug 2025 112,546.007 Aug 2025 115,996.004$0.30
long3 Aug 2025 112,546.007 Aug 2025 116,748.004$70.28
long20 Aug 2025 112,873.0022 Aug 2025 116,248.002$56.73
long23 Sep 2025 112,651.0028 Sep 2025 112,284.005−$9.57
long24 Sep 2025 111,999.0028 Sep 2025 112,284.004$0.04
long24 Sep 2025 111,999.001 Oct 2025 115,420.007$57.06
long26 Sep 2025 108,994.001 Oct 2025 115,420.005$2.35
long26 Sep 2025 108,994.001 Oct 2025 115,940.005$120.94
long11 Oct 2025 112,774.0012 Oct 2025 113,964.001$18.48
long12 Oct 2025 110,644.0012 Oct 2025 113,964.000$0.87
long12 Oct 2025 110,644.0020 Oct 2025 109,691.008−$20.28
long17 Oct 2025 108,194.0020 Oct 2025 109,691.003$1.21
long17 Oct 2025 108,194.0020 Oct 2025 111,454.003$55.52
long18 Oct 2025 106,432.0020 Oct 2025 111,454.002$4.40
long18 Oct 2025 106,432.0027 Oct 2025 116,094.009$172.14
long5 Nov 2025 101,497.009 Nov 2025 104,567.004$60.05
long15 Nov 2025 94,594.0020 Nov 2025 86,440.705−$182.70
long15 Nov 2025 94,594.0021 Nov 2025 85,930.306−$1.67
long16 Nov 2025 95,596.2021 Nov 2025 85,930.305−$216.05
long17 Nov 2025 94,261.4021 Nov 2025 85,597.704−$195.54
long18 Nov 2025 92,215.1021 Nov 2025 84,297.103−$180.16
long18 Nov 2025 92,215.1021 Nov 2025 83,551.403−$0.36
long19 Nov 2025 92,960.8021 Nov 2025 83,551.402−$213.53
long22 Nov 2025 85,129.4023 Nov 2025 87,281.901$45.28
long23 Nov 2025 84,739.8023 Nov 2025 87,281.900$0.19
long23 Nov 2025 84,739.8023 Nov 2025 87,671.600$62.72
long16 Dec 2025 86,432.1017 Dec 2025 89,068.001$55.82
long21 Jan 2026 88,427.7023 Jan 2026 91,114.502$55.93
long26 Jan 2026 86,670.4027 Jan 2026 89,320.801$56.63
long30 Jan 2026 84,650.2031 Jan 2026 76,224.101−$197.92
long31 Jan 2026 84,260.5031 Jan 2026 75,834.400−$198.61
long1 Feb 2026 78,741.102 Feb 2026 79,277.301$9.98
long2 Feb 2026 76,968.202 Feb 2026 79,277.300$0.96
long2 Feb 2026 76,968.205 Feb 2026 71,422.003−$135.15
long3 Feb 2026 78,738.605 Feb 2026 71,422.002−$0.98
long3 Feb 2026 78,738.605 Feb 2026 71,044.302−$186.50
long4 Feb 2026 75,770.205 Feb 2026 68,453.601−$182.53
long5 Feb 2026 73,165.805 Feb 2026 65,849.300−$185.07
long6 Feb 2026 62,909.907 Feb 2026 70,580.301$210.02
long24 Feb 2026 64,656.0025 Feb 2026 65,979.901$33.89
long25 Feb 2026 64,058.2025 Feb 2026 65,979.900$0.37
long25 Feb 2026 64,058.2025 Feb 2026 66,577.800$66.94
long23 May 2026 75,539.5025 May 2026 77,851.402$52.57
long28 May 2026 74,449.302 Jun 2026 67,308.405−$176.97
long29 May 2026 73,617.502 Jun 2026 66,476.604−$178.52
long30 May 2026 73,460.802 Jun 2026 66,319.903−$178.71
long2 Jun 2026 71,408.903 Jun 2026 64,732.801−$169.09
long3 Jun 2026 66,760.805 Jun 2026 60,372.202−$163.92
long4 Jun 2026 64,142.807 Jun 2026 62,711.203−$39.61
long5 Jun 2026 63,886.007 Jun 2026 62,711.202−$0.65
long5 Jun 2026 63,886.007 Jun 2026 62,883.002−$27.99
long6 Jun 2026 61,056.507 Jun 2026 62,883.001$1.62
long6 Jun 2026 61,056.5011 Jun 2026 63,356.305$56.25
long7 Jun 2026 60,884.6011 Jun 2026 63,356.304$2.60
long7 Jun 2026 60,884.6011 Jun 2026 63,575.304$65.87
long10 Jun 2026 61,730.0011 Jun 2026 63,575.301$2.08
long10 Jun 2026 61,730.0015 Jun 2026 65,858.405$102.27
long11 Jun 2026 61,511.0015 Jun 2026 65,858.404$2.73
long11 Jun 2026 61,511.0015 Jun 2026 65,969.304$113.18
long26 Jun 2026 59,794.601 Jul 2026 60,383.505$14.18
long27 Jun 2026 60,097.301 Jul 2026 60,383.504$0.01
long27 Jun 2026 60,097.302 Jul 2026 61,377.705$33.60
long28 Jun 2026 60,029.002 Jul 2026 61,377.704$0.21
long28 Jun 2026 60,029.002 Jul 2026 61,553.404$40.37
long29 Jun 2026 59,577.002 Jul 2026 61,553.403$0.50
long29 Jun 2026 59,577.002 Jul 2026 61,829.703$60.84
long1 Jul 2026 58,624.702 Jul 2026 61,829.701$0.58
long1 Jul 2026 58,624.702 Jul 2026 61,898.001$90.13
long15 Aug 2026 63,043.6018 Aug 2026 64,836.003$47.05
long17 Aug 2026 62,900.0018 Aug 2026 64,836.001$0.09
long17 Aug 2026 62,900.0018 Aug 2026 64,979.501$55.01
long9 Oct 2026 81,754.5012 Oct 2026 84,267.703$51.68

Similar scripts

Indicators and strategies built from the same calculations, run on BTCUSDT 1D with their own defaults so they can be compared directly.

ScriptSharesTypeNetTradesMax drawdown
Simple RSI strategy this page—v4 strategy−11.0%11924.4%
Wilder's Volatility Trailing Stop Strategy with various MA's by SparkyFlaryrma lowest highestv4 strategy+16.9%1541.6%
HiLo Extension by Saravanan_Ragavanlowest highest rmav4 strategyNo trades on this market
Directional Movement Index by wojak_bogdanofflowest highest rmav5 strategy+49.7%3519.4%
Alex Days HiLo Rajib by 14rajibhighest lowestv4 strategyNo trades on this market
Donchian Strat EXMO by pskoroplashighest lowestv4 strategy+12.1%2268.0%

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 21 msYes 1,000 bars in 52 msNot measured
PineTSNo v5 and v6 only—Not measured

“Matches TradingView” needs this script's own output exported from TradingView and compared bar by bar, which has not been done for this script. The engine is built on OpenPineScript, whose conformance results are in its conformance report. PineTS runs Pine Script v5 and v6 only.

Source

Copied verbatim from the author's published script, with its licence header intact. The author may have updated the original since this snapshot.

//@version=4// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © RafaelZionistrategy(title='Simple RSI strategy', overlay=false, pyramiding=5, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=20, commission_type=strategy.commission.percent, commission_value=0.075)SWperiod = 1look = 0OverBought = input(80, minval=50)OverSold = input(25, maxval=50)bandmx = hline(100)bandmn = hline(0)band1 = hline(OverBought)band0 = hline(OverSold)//band50 = hline(50, color=black, linewidth=1)fill(band1, band0, color=color.purple, transp=98)src = closelen = input(5, minval=1, title="RSI Length")up = rma(max(change(src), 0), len)down = rma(-min(change(src), 0), len)rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)p = 100//scalehh = highest(high, p)ll = lowest(low, p)scale = hh - ll//dynamic OHLCdyno = (open - ll) / scale * 100dynl = (low - ll) / scale * 100dynh = (high - ll) / scale * 100dync = (close - ll) / scale * 100//candle colorcolor_1 = close > open ? 1 : 0//drawcandlehline(78.6)hline(61.8)hline(50)hline(38.2)hline(23.6)plotcandle(dyno, dynh, dynl, dync, title="Candle", color=color_1 == 1 ? color.green : color.red)plot(10, color=color.green)plot(55, color=color.black)plot(80, color=color.black)plot(90, color=color.red)long = rsi <= OverSold ? 5 : na//Strategygolong = rsi <= OverSold ? 5 : nalongsignal = golong  //based on https://www.tradingview.com/script/7NNJ0sXB-Pyramiding-Entries-On-Early-Trends-by-Coinrule///set take profitProfitTarget_Percent = input(3)Profit_Ticks = close * (ProfitTarget_Percent / 100) / syminfo.mintick//set take profitLossTarget_Percent = input(10)Loss_Ticks = close * (LossTarget_Percent / 100) / syminfo.mintick//Order Placingstrategy.entry("Entry 1", strategy.long, when=strategy.opentrades == 0 and longsignal)strategy.entry("Entry 2", strategy.long, when=strategy.opentrades == 1 and longsignal)strategy.entry("Entry 3", strategy.long, when=strategy.opentrades == 2 and longsignal)strategy.entry("Entry 4", strategy.long, when=strategy.opentrades == 3 and longsignal)strategy.entry("Entry 5", strategy.long, when=strategy.opentrades == 4 and longsignal)strategy.entry("Entry 6", strategy.long, when=strategy.opentrades == 5 and longsignal)strategy.entry("Entry 7", strategy.long, when=strategy.opentrades == 6 and longsignal)if strategy.position_size > 0    strategy.exit(id="Exit 1", from_entry="Entry 1", profit=Profit_Ticks, loss=Loss_Ticks)    strategy.exit(id="Exit 2", from_entry="Entry 2", profit=Profit_Ticks, loss=Loss_Ticks)    strategy.exit(id="Exit 3", from_entry="Entry 3", profit=Profit_Ticks, loss=Loss_Ticks)    strategy.exit(id="Exit 4", from_entry="Entry 4", profit=Profit_Ticks, loss=Loss_Ticks)    strategy.exit(id="Exit 5", from_entry="Entry 5", profit=Profit_Ticks, loss=Loss_Ticks)    strategy.exit(id="Exit 6", from_entry="Entry 6", profit=Profit_Ticks, loss=Loss_Ticks)    strategy.exit(id="Exit 7", from_entry="Entry 7", profit=Profit_Ticks, loss=Loss_Ticks)