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
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
VerifiedSame 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)⋯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.
| Setting | Default | Type and range | Feeds |
|---|---|---|---|
| Moving Average | |||
| 1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA, 8=Tilson T3 | 7 | int · min 1 · max 8 | avg |
| MA Source | close | source | hullma ema1 tilT3 avg line 44 line 45 |
| Moving Average Length - LookBack Period | 5 | int | hullma ema1 ema2 ema3 tilT3 avg line 44 line 45 |
| Tilson T3 Factor - *.10 - so 7 = .7 etc. | 7 | int · min 0 | factor |
| MA Slope Lookback | 3 | int · min 1 | DeltaAvg |
| MA Slope Smoothing | 5 | int · min 1 | SmoothedAvg |
| Momentum Moving Average | |||
| 1=RSI, 2=CCI, 3=RSI/ROC | 3 | int · min 1 · max 3 | Momentum |
| Momentum Source | close | source | Momentum |
| Momentum Length | 3 | int · min 1 | Momentum |
| Momentum Slope Lookback | 8 | int · min 1 | Deltamom |
| Momentum Slope Smoothing | 7 | int · min 1 | SmoothedMom |
| Time Resolution | |||
| Higher timeframe? | 1 | timeframe (written input.resolution) | MAout Momout |
| MA Slope multiplier for Alternate Resolutions (Make the waves of the blue line similar size as the orange line) | 130 | int | MAout |
| Buy and Sell Threshold | |||
| Buy when both slopes cross this line | 0.02 | float · step 0.01 | longCondition Buy line |
| Sell when both slopes cross this line | -0.03 | float · step 0.01 | shortCondition Sell line |
| Low Volatility Function | |||
| Big MA Length | 28 | int · min 1 | low_vol_MA |
| Low Volatility Moving Average Length | 10 | int · min 1 | chng_MA |
| Low Volatility Buy and Sell Threshold | 0.05 | float · step 0.01 | low_vol_down low_vol_up |
| Minimum volatility to trade | 2.5 | float · min 0 · step 0.01 | bad_vol |
What it calculates
- SMA (
sma,ta.smain v5)close, Big MA Length (28)low_vol_MA · line 27 - SMA (
sma,ta.smain v5)percent_volatility, Low Volatility Moving Average Length (10)chng_MA · line 31 - WMA (
wma,ta.wmain v5)2*wma(masrc, malen/2)-wma(masrc, malen), round(sqrt(malen))hullma · line 36 - EMA (
ema,ta.emain v5)MA Source (close), Moving Average Length - LookBack Period (5)ema1 · line 38 - EMA (
ema,ta.emain v5)ema1, Moving Average Length - LookBack Period (5)ema2 · line 39 - EMA (
ema,ta.emain v5)ema2, Moving Average Length - LookBack Period (5)ema3 · line 40 - SMA / EMA / WMA / VWMA / RMA (
sma,ta.smain v5)MA Source (close), Moving Average Length - LookBack Period (5)avg · line 49 - SMA (
sma,ta.smain v5)DeltaAvg, MA Slope Smoothing (5)SmoothedAvg · line 52 - RSI / CCI / ROC (
rsi,ta.rsiin v5)Momentum Source (close), Momentum Length (3)Momentum · line 55 - SMA (
sma,ta.smain 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.
Order rules
| Order | Fires when | By default | Line |
|---|---|---|---|
| Open Buy long | (longCondition) | On | 67 |
| Open Sell short | (shortCondition) | On | 70 |
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.
- 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 bars | Trades | Won | P&L |
|---|---|---|---|
| Rising market | 9 | 67% | $286.26 |
| Sideways market | 22 | 23% | −$1,274.60 |
| Falling market | 13 | 0% | −$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.
All 44 trades
| Side | Entry | Exit | Bars | P&L |
|---|---|---|---|---|
| long | 26 Feb 2024 51,728.80 | 18 Jun 2024 66,504.30 | 113 | $285.63 |
| long | 10 Jun 2024 69,648.10 | 18 Jun 2024 66,504.30 | 8 | −$60.77 |
| short | 18 Jun 2024 66,504.30 | 3 May 2025 96,887.10 | 319 | −$559.58 |
| short | 23 Jun 2024 64,262.00 | 3 May 2025 96,887.10 | 314 | −$642.81 |
| long | 3 May 2025 96,887.10 | 20 Jun 2025 104,659.00 | 48 | $1.80 |
| long | 4 May 2025 95,856.40 | 20 Jun 2025 104,659.00 | 47 | $2.04 |
| short | 20 Jun 2025 104,659.00 | 1 Jul 2025 107,147.00 | 11 | −$0.63 |
| long | 1 Jul 2025 107,147.00 | 10 Jul 2025 111,234.00 | 9 | $0.98 |
| long | 2 Jul 2025 105,681.00 | 10 Jul 2025 111,234.00 | 8 | $1.33 |
| short | 10 Jul 2025 111,234.00 | 13 Jul 2025 117,420.00 | 3 | −$1.56 |
| long | 13 Jul 2025 117,420.00 | 11 Aug 2025 119,294.00 | 29 | $0.42 |
| long | 14 Jul 2025 119,087.00 | 11 Aug 2025 119,294.00 | 28 | $0.05 |
| short | 11 Aug 2025 119,294.00 | 14 Aug 2025 123,306.00 | 3 | −$0.90 |
| short | 12 Aug 2025 118,686.00 | 14 Aug 2025 123,306.00 | 2 | −$1.05 |
| long | 14 Aug 2025 123,306.00 | 18 Aug 2025 117,405.00 | 4 | −$1.19 |
| short | 18 Aug 2025 117,405.00 | 18 Sep 2025 116,448.00 | 31 | $0.19 |
| short | 5 Sep 2025 110,731.00 | 18 Sep 2025 116,448.00 | 13 | −$1.30 |
| long | 18 Sep 2025 116,448.00 | 22 Sep 2025 115,232.00 | 4 | −$0.24 |
| long | 19 Sep 2025 117,074.00 | 22 Sep 2025 115,232.00 | 3 | −$0.36 |
| short | 22 Sep 2025 115,232.00 | 23 Sep 2025 112,651.00 | 1 | $0.49 |
| long | 23 Sep 2025 112,651.00 | 27 Sep 2025 109,643.00 | 4 | −$0.60 |
| long | 24 Sep 2025 111,999.00 | 27 Sep 2025 109,643.00 | 3 | −$0.47 |
| short | 27 Sep 2025 109,643.00 | 29 Sep 2025 112,164.00 | 2 | −$0.49 |
| short | 28 Sep 2025 109,636.00 | 29 Sep 2025 112,164.00 | 1 | −$0.50 |
| long | 29 Sep 2025 112,164.00 | 29 Dec 2025 87,952.70 | 91 | −$4.42 |
| long | 30 Sep 2025 114,312.00 | 29 Dec 2025 87,952.70 | 90 | −$4.81 |
| short | 29 Dec 2025 87,952.70 | 5 Jan 2026 91,529.70 | 7 | −$0.46 |
| short | 30 Dec 2025 87,237.10 | 5 Jan 2026 91,529.70 | 6 | −$0.56 |
| long | 5 Jan 2026 91,529.70 | 10 Jan 2026 90,641.30 | 5 | −$0.10 |
| long | 6 Jan 2026 93,859.70 | 10 Jan 2026 90,641.30 | 4 | −$0.36 |
| short | 10 Jan 2026 90,641.30 | 12 Jan 2026 91,013.70 | 2 | −$0.04 |
| short | 11 Jan 2026 90,504.70 | 12 Jan 2026 91,013.70 | 1 | −$0.06 |
| long | 12 Jan 2026 91,013.70 | 22 May 2026 77,615.50 | 130 | −$1.42 |
| long | 13 Jan 2026 91,296.20 | 22 May 2026 77,615.50 | 129 | −$1.45 |
| short | 22 May 2026 77,615.50 | 19 Jul 2026 64,834.20 | 58 | $1.12 |
| short | 25 May 2026 77,065.00 | 19 Jul 2026 64,834.20 | 55 | $1.09 |
| long | 19 Jul 2026 64,834.20 | 3 Aug 2026 63,570.00 | 15 | −$0.18 |
| long | 20 Jul 2026 64,722.60 | 3 Aug 2026 63,570.00 | 14 | −$0.16 |
| short | 3 Aug 2026 63,570.00 | 6 Aug 2026 64,665.20 | 3 | −$0.15 |
| short | 4 Aug 2026 63,520.00 | 6 Aug 2026 64,665.20 | 2 | −$0.16 |
| long | 6 Aug 2026 64,665.20 | 14 Aug 2026 63,490.90 | 8 | −$0.15 |
| long | 7 Aug 2026 64,323.60 | 14 Aug 2026 63,490.90 | 7 | −$0.11 |
| short | 14 Aug 2026 63,490.90 | 14 Sep 2026 76,842.00 | 31 | −$1.70 |
| short | 15 Aug 2026 63,043.60 | 14 Sep 2026 76,842.00 | 30 | −$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.
| Script | Shares | Type | Net | Trades | Max drawdown |
|---|---|---|---|---|---|
| DRSI DMA Scalping Strategy No Repaint this page | — | v4 strategy | −99.5% | 44 | 137.7% |
| Momentum Explosion 2CCI RSI by capam | ema sma cci rsi | v4 strategy | +24.1% | 6 | 42.3% |
| High-Low Channel Multi averages Crypto Swing strategy by exlux99 | sma ema wma rma vwma | v4 strategy | No trades on this market | ||
| Kahlman HullMA - WT Cross Strategy by pigsq | ema sma rsi rma | v5 strategy | +1.0% | 54 | 33.3% |
| EMA bands + leledc + bollinger bands trend following strategy v2 by readysetliqd | ema sma rsi rma wma | v5 strategy | +7.8% | 38 | 32.0% |
| VCP pivot buy by perrycc007 | sma ema rma vwma wma | v4 strategy | does not run in Zeal Terminal | ||
Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 17 ms | Yes 1,000 bars in 83 ms | Not measured |
| PineTS | No 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)