Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

CoinruleCombinedCryptoStrat

A Pine Script v4 strategy built on RSI (close, lengthRSI), Crossover (9, 50) and Crossunder (close, 100). It has 3 order rules, 1 entry among them, and trades long only with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 2% of equity and pays 0.35% commission. 16 settings; defaults include Oversold 35, Overbought 70 and Additional Timescale 60.

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 CoinruleCombinedCryptoStrat repaint?
Yes
At least one pattern in the source can repaint: higher-timeframe data.
How did CoinruleCombinedCryptoStrat do on BTCUSDT 1D with default settings?
+17.63%
From 26 Jan 2024 to 21 Oct 2026, over 98 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Can CoinruleCombinedCryptoStrat 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 CoinruleCombinedCryptoStrat use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does CoinruleCombinedCryptoStrat run in Zeal Terminal?
Yes
It compiles in 14 ms and runs 1,000 bars in 44 ms, in the browser.

BTCUSDT · 1D · default settings

  • signal
  • fast
  • slow
  • mid
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOct$12,952$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. Zeal Terminal's engine currently reads an order side written as long = true as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 37) so the engine trades the way the script says. The live re-run is not offered here: the script requests BINANCE:BTCUSDT 60, which this page cannot load in your browser.

Needs BINANCE:BTCUSDT 60 data, not available: a lower timeframe than the chart; the engine does not evaluate intrabar data Values that depend on it are empty on this chart.

Net profit
+17.63%
$1,762.50
Buy and hold
+102.5%
same period
Closed trades
98
77 won · 21 lost
Profitable
78.6%
of closed trades
Profit factor
4.33
gross profit ÷ gross loss
Max drawdown
20.74%
−$2,397.18

One run with the author's default settings, $10,000 starting capital, commission as the script sets it. A long position was still open at the last bar. 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.

  • Check

    4 settings do nothing

    “Long ma fast”, “Long ma slow”, “Lookback Long Period”, “Lookback Short Period” are declared but never read.

  • Check

    No stop loss

    Every exit waits for a signal. Nothing limits a losing trade before the exit condition fires.

  • Note

    13 settings have no label

    In the settings dialog oversold (line 9), overbought (line 10), SellPct (line 16), ExitPct (line 17), movingaverage_signal (line 19), movingaverage_fast (line 20), movingaverage_slow (line 21), movingaverage_mid (line 22), long_ma_signal (line 23), long_ma_fast (line 24), long_ma_slow (line 25), long_ma_mid (line 26), Stop_loss (line 41) 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 37, 46, 47. The upgraded version below moves each call inside an if block.

  • Note

    Uses long =, which v5 renamed line 37

    long = on line 37. v5 writes it as direction = strategy.long or strategy.short.

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 rsi → ta.rsi, sma → ta.sma, security → request.security, crossover → ta.crossover, crossunder → ta.crossunder.
  • 3 strategy calls use the when = argument (line 37, 46, 47). It is deprecated in v5 and removed in v6, where each call moves inside an if block.

v4 → v5

Verified

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

  • Line 3: //@version=4 → //@version=5
  • Line 7: rsi → ta.rsi
  • Line 19: sma → ta.sma
  • Line 20: sma → ta.sma
  • Line 21: sma → ta.sma
  • Line 22: sma → ta.sma
11 more edits
  • Line 23: security → request.security
  • Line 23: sma → ta.sma
  • Line 24: security → request.security
  • Line 24: sma → ta.sma
  • Line 25: security → request.security
  • Line 25: sma → ta.sma
  • Line 26: security → request.security
  • Line 26: sma → ta.sma
  • Line 35: crossover → ta.crossover
  • Line 37: long = true → direction = strategy.long
  • Line 44: crossunder → ta.crossunder
⋯// © syfuslokust-//@version=4+//@version=5strategy(shorttitle='CoinruleCombinedCryptoStrat',title='CoinruleCombinedCryptoStrat', overlay=true, initial_capital = 10000, pyramiding = 1000, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 2, commission_type=strategy.commission.percent, commission_value=0.35)⋯lengthRSI = 14-RSI = rsi(close, lengthRSI)+RSI = ta.rsi(close, lengthRSI)//Normal⋯//MA inputs and calculations-movingaverage_signal = sma(close, input(9))+movingaverage_signal = ta.sma(close, input(9))-movingaverage_fast = sma(close, input(50))+movingaverage_fast = ta.sma(close, input(50))-movingaverage_slow = sma(close, input(200))+movingaverage_slow = ta.sma(close, input(200))-movingaverage_mid= sma(close, input(100))+movingaverage_mid= ta.sma(close, input(100))-long_ma_signal = security(syminfo.tickerid, res, sma(close, input(9)), lookahead=barmerge.lookahead_on)+long_ma_signal = request.security(syminfo.tickerid, res, ta.sma(close, input(9)), lookahead=barmerge.lookahead_on)-long_ma_fast = security(syminfo.tickerid, res, sma(close, input(50)), lookahead=barmerge.lookahead_on)+long_ma_fast = request.security(syminfo.tickerid, res, ta.sma(close, input(50)), lookahead=barmerge.lookahead_on)-long_ma_slow = security(syminfo.tickerid, res, sma(close, input(200)), lookahead=barmerge.lookahead_on)+long_ma_slow = request.security(syminfo.tickerid, res, ta.sma(close, input(200)), lookahead=barmerge.lookahead_on)-long_ma_mid= security(syminfo.tickerid, res, sma(close, input(100)), lookahead=barmerge.lookahead_on)+long_ma_mid= request.security(syminfo.tickerid, res, ta.sma(close, input(100)), lookahead=barmerge.lookahead_on)//Look Back⋯//MA-bullish = crossover(movingaverage_signal, movingaverage_fast)+bullish = ta.crossover(movingaverage_signal, movingaverage_fast)//Execute buy-strategy.entry(id="long", long = true, when = (RSI < oversold) and movingaverage_signal < movingaverage_mid, comment="BuyIn")+strategy.entry(id="long", direction = strategy.long, when = (RSI < oversold) and movingaverage_signal < movingaverage_mid, comment="BuyIn")//when = crossover(close, movingaverage_signal) and movingaverage_signal < movingaverage_slow and RSI < oversold)⋯//MA-bearish = crossunder(close, long_ma_mid)+bearish = ta.crossunder(close, long_ma_mid)//Execute sell⋯

Clean v5

VerifiedDownload the v5 script

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

  • Line 9: input() → input.int()
  • Line 10: input() → input.int()
  • Line 11: input() → input.string()
  • Line 16: input() → input.int()
  • Line 17: input() → input.int()
  • Line 19: input() → input.int()
13 more edits
  • Line 20: input() → input.int()
  • Line 21: input() → input.int()
  • Line 22: input() → input.int()
  • Line 23: input() → input.int()
  • Line 24: input() → input.int()
  • Line 25: input() → input.int()
  • Line 26: input() → input.int()
  • Line 28: input() → input.int()
  • Line 29: input() → input.int()
  • Line 37: when = (RSI < oversold) and movingaverage_signal < movingaverage_mid → if block
  • Line 41: input() → input.int()
  • Line 46: when = RSI > overbought and movingaverage_fast > movingaverage_mid → if block
  • Line 47: when = bearish → if block
⋯//Normal-oversold = input(35)+oversold = input.int(35)-overbought =  input(70)+overbought =  input.int(70)-res = input(title="Additional Timescale", defval="60", options=["5", "15", "60", "360", "1D"])+res = input.string(title="Additional Timescale", defval="60", options=["5", "15", "60", "360", "1D"])//ALGO⋯//sell pct-SellPct = input(15)+SellPct = input.int(15)-ExitPct = input(50)+ExitPct = input.int(50)//MA inputs and calculations-movingaverage_signal = ta.sma(close, input(9))+movingaverage_signal = ta.sma(close, input.int(9))-movingaverage_fast = ta.sma(close, input(50))+movingaverage_fast = ta.sma(close, input.int(50))-movingaverage_slow = ta.sma(close, input(200))+movingaverage_slow = ta.sma(close, input.int(200))-movingaverage_mid= ta.sma(close, input(100))+movingaverage_mid= ta.sma(close, input.int(100))-long_ma_signal = request.security(syminfo.tickerid, res, ta.sma(close, input(9)), lookahead=barmerge.lookahead_on)+long_ma_signal = request.security(syminfo.tickerid, res, ta.sma(close, input.int(9)), lookahead=barmerge.lookahead_on)-long_ma_fast = request.security(syminfo.tickerid, res, ta.sma(close, input(50)), lookahead=barmerge.lookahead_on)+long_ma_fast = request.security(syminfo.tickerid, res, ta.sma(close, input.int(50)), lookahead=barmerge.lookahead_on)-long_ma_slow = request.security(syminfo.tickerid, res, ta.sma(close, input(200)), lookahead=barmerge.lookahead_on)+long_ma_slow = request.security(syminfo.tickerid, res, ta.sma(close, input.int(200)), lookahead=barmerge.lookahead_on)-long_ma_mid= request.security(syminfo.tickerid, res, ta.sma(close, input(100)), lookahead=barmerge.lookahead_on)+long_ma_mid= request.security(syminfo.tickerid, res, ta.sma(close, input.int(100)), lookahead=barmerge.lookahead_on)//Look Back-inp_lkb = input(12, title='Lookback Long Period')+inp_lkb = input.int(12, title='Lookback Long Period')-inp_lkb_2 = input(2, title='Lookback Short Period')+inp_lkb_2 = input.int(2, title='Lookback Short Period') ⋯//Execute buy-strategy.entry(id="long", direction = strategy.long, when = (RSI < oversold) and movingaverage_signal < movingaverage_mid, comment="BuyIn")+if (RSI < oversold) and movingaverage_signal < movingaverage_mid+    strategy.entry(id="long", direction = strategy.long, comment="BuyIn")//when = crossover(close, movingaverage_signal) and movingaverage_signal < movingaverage_slow and RSI < oversold)⋯//RSI-Stop_loss= ((input (4))/100)+Stop_loss= ((input.int (4))/100)longStopPrice  = strategy.position_avg_price * (1 - Stop_loss)⋯//Execute sell-strategy.close("long", qty_percent = SellPct, when = RSI > overbought and movingaverage_fast > movingaverage_mid, comment="SmallSell")+if RSI > overbought and movingaverage_fast > movingaverage_mid+    strategy.close("long", qty_percent = SellPct, comment="SmallSell")-strategy.close("long", qty_percent = ExitPct, when = bearish, comment="StopLoss")+if bearish+    strategy.close("long", qty_percent = ExitPct, comment="StopLoss")//strategy.close("long", qty_percent = ExitPct, when = bearish )⋯

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: 98 before, 98 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.

⋯// © syfuslokust-//@version=5+//@version=6strategy(shorttitle='CoinruleCombinedCryptoStrat',title='CoinruleCombinedCryptoStrat', overlay=true, initial_capital = 10000, pyramiding = 1000, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 2, commission_type=strategy.commission.percent, commission_value=0.35)⋯

Settings

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

SettingDefaultType and rangeFeeds
Oversold (no label in the script)35intentry long
Overbought (no label in the script)70intclose long
Additional Timescale60string · options ["5", "15", "60", "360", "1D"]long_ma_signal long_ma_fast long_ma_slow long_ma_mid
Sell Pct (no label in the script)15intclose long
Exit Pct (no label in the script)50intclose long
Movingaverage signal (no label in the script)9intbullish entry long signal
Movingaverage fast (no label in the script)50intbullish close long fast
Movingaverage slow (no label in the script)200intslow
Movingaverage mid (no label in the script)100intentry long close long mid
Long ma signal (no label in the script)9intlong signal
Long ma fast (no label in the script)50intunused
Long ma slow (no label in the script)200intunused
Long ma mid (no label in the script)100intbearish long slow
Lookback Long Period12intunused
Lookback Short Period2intunused
Stop loss (no label in the script)4intlongStopPrice

What it calculates

  • RSI (rsi, ta.rsi in v5)close, lengthRSIRSI · line 7
  • Crossover (crossover, ta.crossover in v5)Movingaverage signal (9), Movingaverage fast (50)bullish · line 35
  • Crossunder (crossunder, ta.crossunder in v5)close, Long ma mid (100)bearish · line 44

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.

closecloseprice datamovingaverage_signalMovingaverage signalsetting · 9movingaverage_fastMovingaverage fastsetting · 50long_ma_midLong ma midsetting · 100Stop_lossStop losssetting · 4oversoldOversoldsetting · 35movingaverage_midMovingaverage midsetting · 100overboughtOverboughtsetting · 70movingaverage_slowMovingaverage slowsetting · 200long_ma_signalLong ma signalsetting · 9RSIRSI→ RSIbullishCrossover→ bullishbearishCrossunder→ bearishoverall_changeoverall_changevaluelongStopPricelongStopPricevalueentry:longOpen longstrategy.entryclose:longClose longstrategy.closeplot:51signalplotplot:52fastplotplot:53slowplotplot:54midplotplot:55long signalplotplot:56long slowplot

Order rules

OrderFires whenBy defaultLine
Open long long(RSI < oversold) and movingaverage_signal < movingaverage_midOn37
Close longRSI > overbought and movingaverage_fast > movingaverage_midOn46
Close longbearishOn47

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

Does it repaint?

Yes

At least one pattern in the source can repaint; it is marked Check below.

27/27trades 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.
  • CheckHigher-timeframe data4 security call(s) use lookahead_on (line 23, 24, 25, 26). Without a [1] offset this reads future bars in history.
  • 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 timingprocess_orders_on_close = true: orders fill at the signal bar's close.

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

Other markets

Not run on other markets: the script requests BINANCE:BTCUSDT 60, and that data is not available here (a lower timeframe than the chart; the engine does not evaluate intrabar data). Its results would rest on empty values.

The trades

By market direction

At entry, last 90 barsTradesWonP&L
Rising market0—$0.00
Sideways market3694%$1,018.85
Falling market6269%$754.58

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

How bad could the drawdown be?

1.1%

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

0%5%
All 98 trades
SideEntryExitBarsP&L
long23 Jun 2024 63,210.0029 Oct 2024 72,736.40128$28.54
long24 Jun 2024 60,293.3029 Oct 2024 72,736.40127$39.55
long25 Jun 2024 61,806.0029 Oct 2024 72,736.40126$7.74
long25 Jun 2024 61,806.0030 Oct 2024 72,344.70127$25.01
long26 Jun 2024 60,865.0030 Oct 2024 72,344.70126$36.03
long28 Jun 2024 60,427.8030 Oct 2024 72,344.70124$4.14
long28 Jun 2024 60,427.806 Nov 2024 75,572.00131$43.00
long4 Jul 2024 57,050.006 Nov 2024 75,572.00125$40.94
long4 Jul 2024 57,050.007 Nov 2024 75,857.90126$22.02
long5 Jul 2024 56,628.807 Nov 2024 75,857.90125$60.39
long5 Jul 2024 56,628.808 Nov 2024 76,509.80126$5.29
long7 Jul 2024 55,857.808 Nov 2024 76,509.80124$70.33
long7 Jul 2024 55,857.809 Nov 2024 76,677.50125$0.99
long8 Jul 2024 56,714.609 Nov 2024 76,677.50124$61.30
long8 Jul 2024 56,714.6010 Nov 2024 80,370.00125$7.94
long4 Aug 2024 58,161.0010 Nov 2024 80,370.0098$51.51
long4 Aug 2024 58,161.0011 Nov 2024 88,648.0099$31.28
long5 Aug 2024 54,018.8011 Nov 2024 88,648.0098$43.11
long5 Aug 2024 54,018.8012 Nov 2024 87,952.0099$65.56
long5 Aug 2024 54,018.8013 Nov 2024 90,375.20100$14.38
long6 Aug 2024 56,022.0013 Nov 2024 90,375.2099$42.82
long6 Aug 2024 56,022.0014 Nov 2024 87,325.60100$43.63
long6 Aug 2024 56,022.0015 Nov 2024 91,032.10101$28.96
long7 Aug 2024 55,134.2015 Nov 2024 91,032.10100$12.90
long7 Aug 2024 55,134.2016 Nov 2024 90,586.90101$35.76
long7 Aug 2024 55,134.2017 Nov 2024 89,856.00102$29.77
long7 Aug 2024 55,134.2018 Nov 2024 90,464.10103$25.75
long7 Aug 2024 55,134.2019 Nov 2024 92,310.80104$20.80
long6 Sep 2024 53,963.0019 Nov 2024 92,310.8074$2.31
long6 Sep 2024 53,963.0020 Nov 2024 94,286.6075$21.27
long6 Sep 2024 53,963.0021 Nov 2024 98,317.1076$19.90
long6 Sep 2024 53,963.0022 Nov 2024 98,892.0077$17.14
long6 Sep 2024 53,963.0023 Nov 2024 97,672.4078$14.17
long6 Sep 2024 53,963.0024 Nov 2024 97,900.0079$12.11
long6 Sep 2024 53,963.0017 Dec 2024 106,134.00102$12.23
long6 Sep 2024 53,963.0018 May 2025 106,454.00254$69.76
long24 Feb 2025 91,552.9018 May 2025 106,454.0083$33.93
long24 Feb 2025 91,552.9020 May 2025 106,850.0085$0.25
long25 Feb 2025 88,680.4020 May 2025 106,850.0084$43.37
long26 Feb 2025 84,250.1020 May 2025 106,850.0083$14.79
long26 Feb 2025 84,250.1021 May 2025 109,644.0084$47.70
long27 Feb 2025 84,708.6021 May 2025 109,644.0083$18.58
long27 Feb 2025 84,708.6022 May 2025 111,696.0084$47.99
long28 Feb 2025 84,349.9022 May 2025 111,696.0083$12.45
long28 Feb 2025 84,349.9010 Jul 2025 116,010.00132$60.31
long28 Feb 2025 84,349.9011 Jul 2025 117,528.00133$6.04
long1 Mar 2025 86,064.5011 Jul 2025 117,528.00132$45.19
long1 Mar 2025 86,064.5012 Jul 2025 117,420.00133$33.24
long9 Mar 2025 80,734.4012 Jul 2025 117,420.00125$11.61
long9 Mar 2025 80,734.4013 Jul 2025 119,087.00126$45.04
long9 Mar 2025 80,734.4014 Jul 2025 119,841.00127$39.05
long9 Mar 2025 80,734.4017 Jul 2025 119,178.00130$6.24
long10 Mar 2025 78,595.9017 Jul 2025 119,178.00129$27.89
long10 Mar 2025 78,595.9027 Aug 2026 80,249.60535$2.27
long8 Apr 2025 76,322.4027 Aug 2026 80,249.60506$9.57
long4 Nov 2025 101,497.0027 Aug 2026 80,249.60296−$50.19
long6 Nov 2025 101,346.0027 Aug 2026 80,249.60294−$49.91
long14 Nov 2025 94,594.0027 Aug 2026 80,249.60286−$36.59
long15 Nov 2025 95,596.2027 Aug 2026 80,249.60285−$38.68
long16 Nov 2025 94,261.4027 Aug 2026 80,249.60284−$35.88
long17 Nov 2025 92,215.1027 Aug 2026 80,249.60283−$31.43
long18 Nov 2025 92,960.8027 Aug 2026 80,249.60282−$33.07
long19 Nov 2025 91,555.0027 Aug 2026 80,249.60281−$24.23
long19 Nov 2025 91,555.0028 Aug 2026 77,845.90282−$6.86
long20 Nov 2025 86,637.2028 Aug 2026 77,845.90281−$24.63
long21 Nov 2025 85,129.4028 Aug 2026 77,845.90280−$20.94
long22 Nov 2025 84,739.7028 Aug 2026 77,845.90279−$19.97
long23 Nov 2025 86,830.0028 Aug 2026 77,845.90278−$25.11
long24 Nov 2025 88,300.0028 Aug 2026 77,845.90277−$28.63
long25 Nov 2025 87,370.0028 Aug 2026 77,845.90276−$26.40
long1 Dec 2025 86,286.0028 Aug 2026 77,845.90270−$23.77
long29 Jan 2026 84,650.2028 Aug 2026 77,845.90211−$9.83
long29 Jan 2026 84,650.2029 Aug 2026 78,230.00212−$9.35
long30 Jan 2026 84,260.5029 Aug 2026 78,230.00211−$17.68
long31 Jan 2026 78,741.1029 Aug 2026 78,230.00210−$2.97
long1 Feb 2026 76,968.2029 Aug 2026 78,230.00209$2.04
long2 Feb 2026 78,738.6029 Aug 2026 78,230.00208−$2.96
long3 Feb 2026 75,770.2029 Aug 2026 78,230.00207$5.50
long4 Feb 2026 73,165.8029 Aug 2026 78,230.00206$8.60
long4 Feb 2026 73,165.8031 Aug 2026 78,581.30208$5.02
long5 Feb 2026 62,909.9031 Aug 2026 78,581.30207$48.55
long6 Feb 2026 70,580.3031 Aug 2026 78,581.30206$22.38
long7 Feb 2026 69,289.4031 Aug 2026 78,581.30205$26.53
long8 Feb 2026 70,330.4031 Aug 2026 78,581.30204$23.18
long9 Feb 2026 70,138.0031 Aug 2026 78,581.30203$11.02
long9 Feb 2026 70,138.003 Sep 2026 81,270.40206$17.09
long10 Feb 2026 68,841.303 Sep 2026 81,270.40205$36.07
long11 Feb 2026 67,082.503 Sep 2026 81,270.40204$41.93
long12 Feb 2026 66,272.203 Sep 2026 81,270.40203$44.67
long17 Feb 2026 67,503.503 Sep 2026 81,270.40198$21.78
long17 Feb 2026 67,503.5021 Sep 2026 86,620.00216$26.29
long18 Feb 2026 66,461.0021 Sep 2026 86,620.00215$60.43
long19 Feb 2026 67,003.7021 Sep 2026 86,620.00214$58.55
long23 Feb 2026 64,656.0021 Sep 2026 86,620.00210$64.51
long23 Feb 2026 64,656.0022 Sep 2026 86,208.60211$2.13
long24 Feb 2026 64,058.2022 Sep 2026 86,208.60210$67.50
long3 Jun 2026 64,142.8022 Sep 2026 86,208.60111$67.20
long4 Jun 2026 63,886.0022 Sep 2026 86,208.60110$57.65

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
CoinruleCombinedCryptoStrat this page—v4 strategy+17.6%9820.7%
Triple RSI strategy by Trade_by_DBrsiv5 strategy+3.2%23.3%
Hobbiecode - RSI + Close previous day by hobbiecodersiv5 strategy+1.2%634.2%
dirt cheap yet elegant RSI Strategy by SparkyFlaryrsiv4 strategy−11.4%820.5%
RSI Classic Strategy (by Coinrule) by Coinrulersiv4 strategy+7.5%67.2%
RSITrendStrategy by email_analystsrsiv4 strategy+69.2%2238.6%

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 14 msWith a workaround 1,000 bars in 44 msNot measured
PineTSNo v5 and v6 only—Not measured

Zeal Terminal's engine currently reads an order side written as long = true as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 37) so the engine trades the way the script says.

The engine and this page's reading of the source count a different number of settings, so one of them has missed one.

“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.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © syfuslokust//@version=4strategy(shorttitle='CoinruleCombinedCryptoStrat',title='CoinruleCombinedCryptoStrat', overlay=true, initial_capital = 10000, pyramiding = 1000, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 2, commission_type=strategy.commission.percent, commission_value=0.35)// RSI inputs and calculationslengthRSI = 14RSI = rsi(close, lengthRSI)//Normaloversold = input(35)overbought =  input(70)res = input(title="Additional Timescale", defval="60", options=["5", "15", "60", "360", "1D"])//ALGO//oversold= input(26)//overbought= input(80)//sell pctSellPct = input(15)ExitPct = input(50)//MA inputs and calculationsmovingaverage_signal = sma(close, input(9))movingaverage_fast = sma(close, input(50))movingaverage_slow = sma(close, input(200))movingaverage_mid= sma(close, input(100))long_ma_signal = security(syminfo.tickerid, res, sma(close, input(9)), lookahead=barmerge.lookahead_on)long_ma_fast = security(syminfo.tickerid, res, sma(close, input(50)), lookahead=barmerge.lookahead_on)long_ma_slow = security(syminfo.tickerid, res, sma(close, input(200)), lookahead=barmerge.lookahead_on)long_ma_mid= security(syminfo.tickerid, res, sma(close, input(100)), lookahead=barmerge.lookahead_on)//Look Backinp_lkb = input(12, title='Lookback Long Period')inp_lkb_2 = input(2, title='Lookback Short Period') perc_change(lkb) =>    overall_change = ((close[0] - close[lkb]) / close[lkb]) * 100//Entry //MAbullish = crossover(movingaverage_signal, movingaverage_fast)//Execute buystrategy.entry(id="long", long = true, when = (RSI < oversold) and movingaverage_signal < movingaverage_mid, comment="BuyIn")//when = crossover(close, movingaverage_signal) and movingaverage_signal < movingaverage_slow and RSI < oversold)//Exit//RSIStop_loss= ((input (4))/100)longStopPrice  = strategy.position_avg_price * (1 - Stop_loss)//MAbearish = crossunder(close, long_ma_mid)//Execute sellstrategy.close("long", qty_percent = SellPct, when = RSI > overbought and movingaverage_fast > movingaverage_mid, comment="SmallSell")strategy.close("long", qty_percent = ExitPct, when = bearish, comment="StopLoss")//strategy.close("long", qty_percent = ExitPct, when = bearish )//when = (crossunder(low, movingaverage_signal) and movingaverage_fast > movingaverage_slow and RSI > overbought) or (movingaverage_signal < movingaverage_fast and crossunder(low, movingaverage_fast)) or (low < longStopPrice))//PLOTplot(movingaverage_signal, color=color.white, linewidth=2, title="signal")plot(movingaverage_fast, color=color.orange, linewidth=2, title="fast")plot(movingaverage_slow, color=color.purple, linewidth=2, title="slow")plot(movingaverage_mid, color=color.blue, linewidth=2, title="mid")plot(long_ma_signal, color=color.yellow, linewidth=1, title="long signal")plot(long_ma_mid, color=color.red, linewidth=1, title="long slow")