Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

DRSI DMA Scalping Strategy No Repaint

A Pine Script v4 strategy built on SMA (close, 28), WMA (masrc, malen, round(sqrt(malen))) and EMA (close, 5). It has 2 order rules, 2 entries among them, and trades long and short with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 100% of equity and pays no commission. 19 settings; defaults include 1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA, 8=Tilson T3 7, MA Source close and Moving Average Length - LookBack Period 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 DRSI DMA Scalping Strategy No Repaint repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 18 of 18 trades.
How did DRSI DMA Scalping Strategy No Repaint do on BTCUSDT 1D with default settings?
−99.54%
From 26 Jan 2024 to 21 Oct 2026, over 44 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Can DRSI DMA Scalping Strategy No Repaint 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 DRSI DMA Scalping Strategy No Repaint use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does DRSI DMA Scalping Strategy No Repaint run in Zeal Terminal?
Yes
It compiles in 17 ms and runs 1,000 bars in 83 ms, in the browser.

BTCUSDT · 1D · default settings

  • Buy line
  • Sell line
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOctBuy line$6$2,025Equity from $1,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. The live re-run is not offered here: the script requests BINANCE:BTCUSDT 1, which this page cannot load in your browser.

Needs BINANCE:BTCUSDT 1 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
−99.54%
−$995.39
Buy and hold
+102.5%
same period
Closed trades
44
11 won · 33 lost
Profitable
25.0%
of closed trades
Profit factor
0.23
gross profit ÷ gross loss
Max drawdown
137.69%
−$1,686.56

One run with the author's default settings, $1,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

    No stop loss

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

  • Check

    No commission

    The backtest assumes free trading. Results on any real exchange will be lower.

  • Check

    Every trade uses all the equity

    default_qty_value is 100% of equity.

  • Note

    No slippage

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

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 sma → ta.sma, security → request.security, wma → ta.wma, round → math.round, sqrt → math.sqrt, ema → ta.ema, vwma → ta.vwma, rma → ta.rma, rsi → ta.rsi, cci → ta.cci, roc → ta.roc.

v4 → v5

Verified

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

  • Line 3: //@version=4 → //@version=5
  • Line 17: input(type = input.resolution) → input.timeframe()
  • Line 27: sma → ta.sma
  • Line 31: sma → ta.sma
  • Line 34: security → request.security
  • Line 36: wma → ta.wma
21 more edits
  • Line 36: wma → ta.wma
  • Line 36: wma → ta.wma
  • Line 36: round → math.round
  • Line 36: sqrt → math.sqrt
  • Line 38: ema → ta.ema
  • Line 39: ema → ta.ema
  • Line 40: ema → ta.ema
  • Line 44: ema → ta.ema
  • Line 44: ema → ta.ema
  • Line 44: ema → ta.ema
  • Line 49: sma → ta.sma
  • Line 49: ema → ta.ema
  • Line 49: wma → ta.wma
  • Line 49: vwma → ta.vwma
  • Line 49: rma → ta.rma
  • Line 52: sma → ta.sma
  • Line 55: rsi → ta.rsi
  • Line 55: cci → ta.cci
  • Line 55: rsi → ta.rsi
  • Line 55: roc → ta.roc
  • Line 58: sma → ta.sma
⋯// © Allenlk-//@version=4+//@version=5strategy("DRSI DMA Scalping Strategy", shorttitle="DRSIDMA", overlay=false, initial_capital=1000, pyramiding=2, default_qty_type=strategy.percent_of_equity, default_qty_value=100)⋯momsmooth          = input(7, title="Momentum Slope Smoothing", minval=1, group="Momentum Moving Average")-higherTf           = input("1", title="Higher timeframe?", type = input.resolution, group="Time Resolution")+higherTf           = input.timeframe("1", title="Higher timeframe?", group="Time Resolution")higherTfmult       = input(130, title="MA Slope multiplier for Alternate Resolutions (Make the waves of the blue line similar size as the orange line)", group="Time Resolution")⋯//When Volatility is low refer to the slope of a long moving average-low_vol_MA         = sma(close, lowVolMALength)+low_vol_MA         = ta.sma(close, lowVolMALength)low_vol_down       = (low_vol_MA[3] - low_vol_MA[1]) > MAThresh⋯percent_volatility = (1 - (low / high)) * 100-chng_MA            = sma(percent_volatility, MAlength)+chng_MA            = ta.sma(percent_volatility, MAlength)bad_vol            = chng_MA < Volminimum//No repaint function-nrp_funct(_symbol, _res, _src) => security(_symbol, _res, _src[barstate.isrealtime ? 1 : 0])+nrp_funct(_symbol, _res, _src) => request.security(_symbol, _res, _src[barstate.isrealtime ? 1 : 0])//hull ma definition-hullma = wma(2*wma(masrc, malen/2)-wma(masrc, malen), round(sqrt(malen)))+hullma = ta.wma(2*ta.wma(masrc, malen/2)-ta.wma(masrc, malen), math.round(math.sqrt(malen)))//TEMA definition-ema1 = ema(masrc, malen)+ema1 = ta.ema(masrc, malen)-ema2 = ema(ema1, malen)+ema2 = ta.ema(ema1, malen)-ema3 = ema(ema2, malen)+ema3 = ta.ema(ema2, malen)tema = 3 * (ema1 - ema2) + ema3⋯factor = factorT3 *.10-gd(masrc, malen, factor) => ema(masrc, malen) * (1 + factor) - ema(ema(masrc, malen), malen) * factor +gd(masrc, malen, factor) => ta.ema(masrc, malen) * (1 + factor) - ta.ema(ta.ema(masrc, malen), malen) * factor t3(masrc, malen, factor) => gd(gd(gd(masrc, malen, factor), malen, factor), malen, factor) ⋯//MA Type -avg = matype == 1 ? sma(masrc,malen) : matype == 2 ? ema(masrc,malen) : matype == 3 ? wma(masrc,malen) : matype == 4 ? hullma : matype == 5 ? vwma(masrc, malen) : matype == 6 ? rma(masrc,malen) : matype == 7 ? 3 * (ema1 - ema2) + ema3 : tilT3+avg = matype == 1 ? ta.sma(masrc,malen) : matype == 2 ? ta.ema(masrc,malen) : matype == 3 ? ta.wma(masrc,malen) : matype == 4 ? hullma : matype == 5 ? ta.vwma(masrc, malen) : matype == 6 ? ta.rma(masrc,malen) : matype == 7 ? 3 * (ema1 - ema2) + ema3 : tilT3//MA Slope PercentageDeltaAvg      = (avg / avg[maderiv]) - 1-SmoothedAvg   = sma(DeltaAvg, masmooth) +SmoothedAvg   = ta.sma(DeltaAvg, masmooth) MAout         = nrp_funct(syminfo.tickerid, higherTf, SmoothedAvg) * higherTfmult//Momentum indicators-Momentum = momtype == 1 ? rsi(momsrc, momlen) : momtype == 2 ? cci(momsrc, momlen) : momtype == 3 ? rsi(roc(momsrc,momlen),momlen) : na+Momentum = momtype == 1 ? ta.rsi(momsrc, momlen) : momtype == 2 ? ta.cci(momsrc, momlen) : momtype == 3 ? ta.rsi(ta.roc(momsrc,momlen),momlen) : na//Momentum Slope PercentageDeltamom = (Momentum / Momentum[momderiv]) - 1-SmoothedMom = sma(Deltamom, momsmooth) +SmoothedMom = ta.sma(Deltamom, momsmooth) Momout   = nrp_funct(syminfo.tickerid, higherTf, SmoothedMom)⋯

Clean v5

VerifiedDownload the v5 script

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

  • Line 6: input() → input.int()
  • Line 7: input() → input.source()
  • Line 8: input() → input.int()
  • Line 9: input() → input.int()
  • Line 10: input() → input.int()
  • Line 11: input() → input.int()
12 more edits
  • Line 12: input() → input.int()
  • Line 13: input() → input.source()
  • Line 14: input() → input.int()
  • Line 15: input() → input.int()
  • Line 16: input() → input.int()
  • Line 18: input() → input.int()
  • Line 19: input() → input.float()
  • Line 20: input() → input.float()
  • Line 21: input() → input.int()
  • Line 22: input() → input.int()
  • Line 23: input() → input.float()
  • Line 24: input() → input.float()
⋯//Inputs-matype             = input(7, minval=1, maxval=8, title="1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA, 8=Tilson T3", group="Moving Average")+matype             = input.int(7, minval=1, maxval=8, title="1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA, 8=Tilson T3", group="Moving Average")-masrc              = input(close, title="MA Source", group="Moving Average")+masrc              = input.source(close, title="MA Source", group="Moving Average")-malen              = input(5, title="Moving Average Length - LookBack Period", group="Moving Average")+malen              = input.int(5, title="Moving Average Length - LookBack Period", group="Moving Average")-factorT3           = input(defval=7, title="Tilson T3 Factor - *.10 - so 7 = .7 etc.", minval=0, group="Moving Average")+factorT3           = input.int(defval=7, title="Tilson T3 Factor - *.10 - so 7 = .7 etc.", minval=0, group="Moving Average")-maderiv            = input(3, title="MA Slope Lookback", minval=1, group="Moving Average")+maderiv            = input.int(3, title="MA Slope Lookback", minval=1, group="Moving Average")-masmooth           = input(5, title="MA Slope Smoothing", minval=1, group="Moving Average")+masmooth           = input.int(5, title="MA Slope Smoothing", minval=1, group="Moving Average")-momtype            = input(3, minval=1, maxval=3, title="1=RSI, 2=CCI, 3=RSI/ROC", group="Momentum Moving Average")+momtype            = input.int(3, minval=1, maxval=3, title="1=RSI, 2=CCI, 3=RSI/ROC", group="Momentum Moving Average")-momsrc             = input(close, title="Momentum Source", group="Momentum Moving Average")+momsrc             = input.source(close, title="Momentum Source", group="Momentum Moving Average")-momlen             = input(3, title="Momentum Length", minval=1, group="Momentum Moving Average")+momlen             = input.int(3, title="Momentum Length", minval=1, group="Momentum Moving Average")-momderiv           = input(8, title="Momentum Slope Lookback", minval=1, group="Momentum Moving Average")+momderiv           = input.int(8, title="Momentum Slope Lookback", minval=1, group="Momentum Moving Average")-momsmooth          = input(7, title="Momentum Slope Smoothing", minval=1, group="Momentum Moving Average")+momsmooth          = input.int(7, title="Momentum Slope Smoothing", minval=1, group="Momentum Moving Average")higherTf           = input.timeframe("1", title="Higher timeframe?", group="Time Resolution")-higherTfmult       = input(130, title="MA Slope multiplier for Alternate Resolutions (Make the waves of the blue line similar size as the orange line)", group="Time Resolution")+higherTfmult       = input.int(130, title="MA Slope multiplier for Alternate Resolutions (Make the waves of the blue line similar size as the orange line)", group="Time Resolution")-buffup             = input(0.02, title="Buy when both slopes cross this line", step=0.01, group="Buy and Sell Threshold")+buffup             = input.float(0.02, title="Buy when both slopes cross this line", step=0.01, group="Buy and Sell Threshold")-bufflow            = input(-0.03, title="Sell when both slopes cross this line", step=0.01, group="Buy and Sell Threshold")+bufflow            = input.float(-0.03, title="Sell when both slopes cross this line", step=0.01, group="Buy and Sell Threshold")-lowVolMALength     = input(28, title="Big MA Length", minval=1, group="Low Volatility Function")+lowVolMALength     = input.int(28, title="Big MA Length", minval=1, group="Low Volatility Function")-MAlength           = input(10, title="Low Volatility Moving Average Length", minval=1, group="Low Volatility Function")+MAlength           = input.int(10, title="Low Volatility Moving Average Length", minval=1, group="Low Volatility Function")-MAThresh           = input(0.05, title="Low Volatility Buy and Sell Threshold", step=0.01, group="Low Volatility Function")+MAThresh           = input.float(0.05, title="Low Volatility Buy and Sell Threshold", step=0.01, group="Low Volatility Function")-Volminimum         = input(2.5, title="Minimum volatility to trade", minval=0, step=0.01, group="Low Volatility Function")+Volminimum         = input.float(2.5, title="Minimum volatility to trade", minval=0, step=0.01, group="Low Volatility Function")//Low Volatility Function⋯

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

⋯// © Allenlk-//@version=5+//@version=6strategy("DRSI DMA Scalping Strategy", shorttitle="DRSIDMA", overlay=false, initial_capital=1000, pyramiding=2, default_qty_type=strategy.percent_of_equity, default_qty_value=100)⋯

Settings

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

SettingDefaultType and rangeFeeds
Moving Average
1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA, 8=Tilson T37int · min 1 · max 8avg
MA Sourceclosesourcehullma ema1 tilT3 avg line 44 line 45
Moving Average Length - LookBack Period5inthullma ema1 ema2 ema3 tilT3 avg line 44 line 45
Tilson T3 Factor - *.10 - so 7 = .7 etc.7int · min 0factor
MA Slope Lookback3int · min 1DeltaAvg
MA Slope Smoothing5int · min 1SmoothedAvg
Momentum Moving Average
1=RSI, 2=CCI, 3=RSI/ROC3int · min 1 · max 3Momentum
Momentum SourceclosesourceMomentum
Momentum Length3int · min 1Momentum
Momentum Slope Lookback8int · min 1Deltamom
Momentum Slope Smoothing7int · min 1SmoothedMom
Time Resolution
Higher timeframe?1timeframe (written input.resolution)MAout Momout
MA Slope multiplier for Alternate Resolutions (Make the waves of the blue line similar size as the orange line)130intMAout
Buy and Sell Threshold
Buy when both slopes cross this line0.02float · step 0.01longCondition Buy line
Sell when both slopes cross this line-0.03float · step 0.01shortCondition Sell line
Low Volatility Function
Big MA Length28int · min 1low_vol_MA
Low Volatility Moving Average Length10int · min 1chng_MA
Low Volatility Buy and Sell Threshold0.05float · step 0.01low_vol_down low_vol_up
Minimum volatility to trade2.5float · min 0 · step 0.01bad_vol

What it calculates

  • SMA (sma, ta.sma in v5)close, Big MA Length (28)low_vol_MA · line 27
  • SMA (sma, ta.sma in v5)percent_volatility, Low Volatility Moving Average Length (10)chng_MA · line 31
  • WMA (wma, ta.wma in v5)2*wma(masrc, malen/2)-wma(masrc, malen), round(sqrt(malen))hullma · line 36
  • EMA (ema, ta.ema in v5)MA Source (close), Moving Average Length - LookBack Period (5)ema1 · line 38
  • EMA (ema, ta.ema in v5)ema1, Moving Average Length - LookBack Period (5)ema2 · line 39
  • EMA (ema, ta.ema in v5)ema2, Moving Average Length - LookBack Period (5)ema3 · line 40
  • SMA / EMA / WMA / VWMA / RMA (sma, ta.sma in v5)MA Source (close), Moving Average Length - LookBack Period (5)avg · line 49
  • SMA (sma, ta.sma in v5)DeltaAvg, MA Slope Smoothing (5)SmoothedAvg · line 52
  • RSI / CCI / ROC (rsi, ta.rsi in v5)Momentum Source (close), Momentum Length (3)Momentum · line 55
  • SMA (sma, ta.sma in v5)Deltamom, Momentum Slope Smoothing (7)SmoothedMom · line 58

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 datalowVolMALengthBig MA Lengthsetting · 28MAlengthLow Volatility Moving A…setting · 10malenMoving Average Length -…setting · 5matype1=SMA, 2=EMA, 3=WMA, 4=…setting · 7masmoothMA Slope Smoothingsetting · 5momtype1=RSI, 2=CCI, 3=RSI/ROCsetting · 3momlenMomentum Lengthsetting · 3momsmoothMomentum Slope Smoothingsetting · 7highhighprice datalowlowprice datafactorT3Tilson T3 Factor - *.10…setting · 7maderivMA Slope Lookbacksetting · 3higherTfHigher timeframe?setting · 1higherTfmultMA Slope multiplier for…setting · 130momderivMomentum Slope Lookbacksetting · 8buffupBuy when both slopes cr…setting · 0.02bufflowSell when both slopes c…setting · -0.03MAThreshLow Volatility Buy and …setting · 0.05VolminimumMinimum volatility to t…setting · 2.5low_vol_MASMA→ low_vol_MAchng_MASMA→ chng_MAhullmaWMA→ hullmaema1EMA→ ema1ema2EMA→ ema2ema3EMA→ ema3avgSMA / EMA / WMA / VWMA …→ avgSmoothedAvgSMA→ SmoothedAvgMomentumRSI / CCI / ROC→ MomentumSmoothedMomSMA→ SmoothedMompercent_volatilitypercent_volatilityvaluetematemavaluefactorfactorvaluetilT3tilT3valueDeltaAvgDeltaAvgvalueMAoutMAoutvalueDeltamomDeltamomvalueMomoutMomoutvaluelongConditionlongConditionvalueshortConditionshortConditionvaluelow_vol_down, low_vol_uplow_vol_down · low_vol_…2 conditionsbad_volbad_volconditionentry:BuyOpen Buystrategy.entryentry:SellOpen Sellstrategy.entryplot:61Buy lineplotplot:62Sell lineplotplot:63MA Slopeplotplot:64Momentum Slopeplot

Order rules

OrderFires whenBy defaultLine
Open Buy long(longCondition)On67
Open Sell short(shortCondition)On70

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.

18/18trades 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 data1 security call(s), none with lookahead on.
  • 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

Not run on other markets: the script requests BINANCE:BTCUSDT 1, 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 market967%$286.26
Sideways market2223%−$1,274.60
Falling market130%−$7.05

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

How bad could the drawdown be?

94.3%

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

0%108%
All 44 trades
SideEntryExitBarsP&L
long26 Feb 2024 51,728.8018 Jun 2024 66,504.30113$285.63
long10 Jun 2024 69,648.1018 Jun 2024 66,504.308−$60.77
short18 Jun 2024 66,504.303 May 2025 96,887.10319−$559.58
short23 Jun 2024 64,262.003 May 2025 96,887.10314−$642.81
long3 May 2025 96,887.1020 Jun 2025 104,659.0048$1.80
long4 May 2025 95,856.4020 Jun 2025 104,659.0047$2.04
short20 Jun 2025 104,659.001 Jul 2025 107,147.0011−$0.63
long1 Jul 2025 107,147.0010 Jul 2025 111,234.009$0.98
long2 Jul 2025 105,681.0010 Jul 2025 111,234.008$1.33
short10 Jul 2025 111,234.0013 Jul 2025 117,420.003−$1.56
long13 Jul 2025 117,420.0011 Aug 2025 119,294.0029$0.42
long14 Jul 2025 119,087.0011 Aug 2025 119,294.0028$0.05
short11 Aug 2025 119,294.0014 Aug 2025 123,306.003−$0.90
short12 Aug 2025 118,686.0014 Aug 2025 123,306.002−$1.05
long14 Aug 2025 123,306.0018 Aug 2025 117,405.004−$1.19
short18 Aug 2025 117,405.0018 Sep 2025 116,448.0031$0.19
short5 Sep 2025 110,731.0018 Sep 2025 116,448.0013−$1.30
long18 Sep 2025 116,448.0022 Sep 2025 115,232.004−$0.24
long19 Sep 2025 117,074.0022 Sep 2025 115,232.003−$0.36
short22 Sep 2025 115,232.0023 Sep 2025 112,651.001$0.49
long23 Sep 2025 112,651.0027 Sep 2025 109,643.004−$0.60
long24 Sep 2025 111,999.0027 Sep 2025 109,643.003−$0.47
short27 Sep 2025 109,643.0029 Sep 2025 112,164.002−$0.49
short28 Sep 2025 109,636.0029 Sep 2025 112,164.001−$0.50
long29 Sep 2025 112,164.0029 Dec 2025 87,952.7091−$4.42
long30 Sep 2025 114,312.0029 Dec 2025 87,952.7090−$4.81
short29 Dec 2025 87,952.705 Jan 2026 91,529.707−$0.46
short30 Dec 2025 87,237.105 Jan 2026 91,529.706−$0.56
long5 Jan 2026 91,529.7010 Jan 2026 90,641.305−$0.10
long6 Jan 2026 93,859.7010 Jan 2026 90,641.304−$0.36
short10 Jan 2026 90,641.3012 Jan 2026 91,013.702−$0.04
short11 Jan 2026 90,504.7012 Jan 2026 91,013.701−$0.06
long12 Jan 2026 91,013.7022 May 2026 77,615.50130−$1.42
long13 Jan 2026 91,296.2022 May 2026 77,615.50129−$1.45
short22 May 2026 77,615.5019 Jul 2026 64,834.2058$1.12
short25 May 2026 77,065.0019 Jul 2026 64,834.2055$1.09
long19 Jul 2026 64,834.203 Aug 2026 63,570.0015−$0.18
long20 Jul 2026 64,722.603 Aug 2026 63,570.0014−$0.16
short3 Aug 2026 63,570.006 Aug 2026 64,665.203−$0.15
short4 Aug 2026 63,520.006 Aug 2026 64,665.202−$0.16
long6 Aug 2026 64,665.2014 Aug 2026 63,490.908−$0.15
long7 Aug 2026 64,323.6014 Aug 2026 63,490.907−$0.11
short14 Aug 2026 63,490.9014 Sep 2026 76,842.0031−$1.70
short15 Aug 2026 63,043.6014 Sep 2026 76,842.0030−$1.79

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
DRSI DMA Scalping Strategy No Repaint this page—v4 strategy−99.5%44137.7%
Momentum Explosion 2CCI RSI by capamema sma cci rsiv4 strategy+24.1%642.3%
High-Low Channel Multi averages Crypto Swing strategy by exlux99sma ema wma rma vwmav4 strategyNo trades on this market
Kahlman HullMA - WT Cross Strategy by pigsqema sma rsi rmav5 strategy+1.0%5433.3%
EMA bands + leledc + bollinger bands trend following strategy v2 by readysetliqdema sma rsi rma wmav5 strategy+7.8%3832.0%
VCP pivot buy by perrycc007sma ema rma vwma wmav4 strategydoes not run in Zeal Terminal

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 17 msYes 1,000 bars in 83 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.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © Allenlk//@version=4strategy("DRSI DMA Scalping Strategy", shorttitle="DRSIDMA", overlay=false, initial_capital=1000, pyramiding=2, default_qty_type=strategy.percent_of_equity, default_qty_value=100)//Inputsmatype             = input(7, minval=1, maxval=8, title="1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA, 8=Tilson T3", group="Moving Average")masrc              = input(close, title="MA Source", group="Moving Average")malen              = input(5, title="Moving Average Length - LookBack Period", group="Moving Average")factorT3           = input(defval=7, title="Tilson T3 Factor - *.10 - so 7 = .7 etc.", minval=0, group="Moving Average")maderiv            = input(3, title="MA Slope Lookback", minval=1, group="Moving Average")masmooth           = input(5, title="MA Slope Smoothing", minval=1, group="Moving Average")momtype            = input(3, minval=1, maxval=3, title="1=RSI, 2=CCI, 3=RSI/ROC", group="Momentum Moving Average")momsrc             = input(close, title="Momentum Source", group="Momentum Moving Average")momlen             = input(3, title="Momentum Length", minval=1, group="Momentum Moving Average")momderiv           = input(8, title="Momentum Slope Lookback", minval=1, group="Momentum Moving Average")momsmooth          = input(7, title="Momentum Slope Smoothing", minval=1, group="Momentum Moving Average")higherTf           = input("1", title="Higher timeframe?", type = input.resolution, group="Time Resolution")higherTfmult       = input(130, title="MA Slope multiplier for Alternate Resolutions (Make the waves of the blue line similar size as the orange line)", group="Time Resolution")buffup             = input(0.02, title="Buy when both slopes cross this line", step=0.01, group="Buy and Sell Threshold")bufflow            = input(-0.03, title="Sell when both slopes cross this line", step=0.01, group="Buy and Sell Threshold")lowVolMALength     = input(28, title="Big MA Length", minval=1, group="Low Volatility Function")MAlength           = input(10, title="Low Volatility Moving Average Length", minval=1, group="Low Volatility Function")MAThresh           = input(0.05, title="Low Volatility Buy and Sell Threshold", step=0.01, group="Low Volatility Function")Volminimum         = input(2.5, title="Minimum volatility to trade", minval=0, step=0.01, group="Low Volatility Function")//Low Volatility Function//When Volatility is low refer to the slope of a long moving averagelow_vol_MA         = sma(close, lowVolMALength)low_vol_down       = (low_vol_MA[3] - low_vol_MA[1]) > MAThreshlow_vol_up         = (low_vol_MA[3] - low_vol_MA[1]) < MAThresh * -1percent_volatility = (1 - (low / high)) * 100chng_MA            = sma(percent_volatility, MAlength)bad_vol            = chng_MA < Volminimum//No repaint functionnrp_funct(_symbol, _res, _src) => security(_symbol, _res, _src[barstate.isrealtime ? 1 : 0])//hull ma definitionhullma = wma(2*wma(masrc, malen/2)-wma(masrc, malen), round(sqrt(malen)))//TEMA definitionema1 = ema(masrc, malen)ema2 = ema(ema1, malen)ema3 = ema(ema2, malen)tema = 3 * (ema1 - ema2) + ema3//Tilson T3factor = factorT3 *.10gd(masrc, malen, factor) => ema(masrc, malen) * (1 + factor) - ema(ema(masrc, malen), malen) * factor t3(masrc, malen, factor) => gd(gd(gd(masrc, malen, factor), malen, factor), malen, factor) tilT3 = t3(masrc, malen, factor)  //MA Type avg = matype == 1 ? sma(masrc,malen) : matype == 2 ? ema(masrc,malen) : matype == 3 ? wma(masrc,malen) : matype == 4 ? hullma : matype == 5 ? vwma(masrc, malen) : matype == 6 ? rma(masrc,malen) : matype == 7 ? 3 * (ema1 - ema2) + ema3 : tilT3//MA Slope PercentageDeltaAvg      = (avg / avg[maderiv]) - 1SmoothedAvg   = sma(DeltaAvg, masmooth) MAout         = nrp_funct(syminfo.tickerid, higherTf, SmoothedAvg) * higherTfmult//Momentum indicatorsMomentum = momtype == 1 ? rsi(momsrc, momlen) : momtype == 2 ? cci(momsrc, momlen) : momtype == 3 ? rsi(roc(momsrc,momlen),momlen) : na//Momentum Slope PercentageDeltamom = (Momentum / Momentum[momderiv]) - 1SmoothedMom = sma(Deltamom, momsmooth) Momout   = nrp_funct(syminfo.tickerid, higherTf, SmoothedMom)//Plottingsplot(buffup, color=color.green, title="Buy line")plot(bufflow, color=color.red, title="Sell line")plot(MAout, color=color.blue, linewidth=2, title="MA Slope")plot(Momout, color=color.orange, linewidth=2, title="Momentum Slope")longCondition = bad_vol ? low_vol_up : MAout > buffup and Momout > buffupif (longCondition)    strategy.entry("Buy", strategy.long)shortCondition = bad_vol ? low_vol_down : MAout < bufflow and Momout < bufflowif (shortCondition)    strategy.entry("Sell", strategy.short)