Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

Momentum Explosion 2CCI RSI

A Pine Script v4 strategy built on EMA (close, 8), SMA (close, 26) and CCI (close, 34). 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 is one contract and pays no commission. It has no settings.

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 Momentum Explosion 2CCI RSI repaint?
No
No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
How did Momentum Explosion 2CCI RSI do on BTCUSDT 1D with default settings?
+24.06%
From 26 Jan 2024 to 21 Oct 2026, over 6 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Can Momentum Explosion 2CCI RSI 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 Momentum Explosion 2CCI RSI use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Momentum Explosion 2CCI RSI run in Zeal Terminal?
Yes
It compiles in 9 ms and runs 1,000 bars in 20 ms, in the browser.

BTCUSDT · 1D · default settings

  • EMA
  • SMA
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
Prerendered with the defaults. Change anything and run it here. The script runs in your browser.
Settings (0)
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOctCCI$143,870$202,527Equity from $100,000
Binance BTCUSDT 1D candles, 26 Jan 2024 to 21 Oct 2026, 1,000 bars, default settings. Triangles mark entries; circles mark exits. The script plots nothing itself; the lines and the lower pane are its own calculations, drawn for reference.
Net profit
+24.06%
$24,061.80
Buy and hold
+102.5%
same period
Closed trades
6
3 won · 3 lost
Profitable
50.0%
of closed trades
Profit factor
1.61
gross profit ÷ gross loss
Max drawdown
42.31%
−$47,602.90

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

  • 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 ema → ta.ema, sma → ta.sma, cci → ta.cci, rsi → ta.rsi, crossover → ta.crossover, mom → ta.mom, crossunder → ta.crossunder.

v4 → v5

VerifiedDownload the v5 script

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

  • Line 13: //@version=4 → //@version=5
  • Line 15: ema → ta.ema
  • Line 16: sma → ta.sma
  • Line 17: cci → ta.cci
  • Line 18: cci → ta.cci
  • Line 19: rsi → ta.rsi
4 more edits
  • Line 25: crossover → ta.crossover
  • Line 25: mom → ta.mom
  • Line 28: crossunder → ta.crossunder
  • Line 28: mom → ta.mom
⋯//RSI 26 < 48.-//@version=4+//@version=5strategy("Momentum Explosion 2CCI RSI", overlay=true)-ema8 = ema(close,8)+ema8 = ta.ema(close,8)-sma26 = sma(close,26)+sma26 = ta.sma(close,26)-cci34 = cci(close,34)+cci34 = ta.cci(close,34)-cci55 = cci(close,55)+cci55 = ta.cci(close,55)-rsi26 = rsi(close,26)+rsi26 = ta.rsi(close,26)//plot(ema8)⋯//plot(rsi26,color=color.red)-longCondition = crossover(ema8, sma26) and mom(sma26,5)>0 and cci34>0 and cci55>0 and rsi26>48+longCondition = ta.crossover(ema8, sma26) and ta.mom(sma26,5)>0 and cci34>0 and cci55>0 and rsi26>48if (longCondition)    strategy.entry("My Long Entry Id", strategy.long)-shortCondition = crossunder(ema8, sma26) and mom(sma26,5)<0 and cci34<0 and cci55<0 and rsi26<48+shortCondition = ta.crossunder(ema8, sma26) and ta.mom(sma26,5)<0 and cci34<0 and cci55<0 and rsi26<48if (shortCondition)⋯

Clean v5

Verified

Nothing to change.

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

⋯//RSI 26 < 48.-//@version=5+//@version=6strategy("Momentum Explosion 2CCI RSI", overlay=true)⋯

Settings

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

The script declares no settings.

What it calculates

  • EMA (ema, ta.ema in v5)close, 8ema8 · line 15
  • SMA (sma, ta.sma in v5)close, 26sma26 · line 16
  • CCI (cci, ta.cci in v5)close, 34cci34 · line 17
  • CCI (cci, ta.cci in v5)close, 55cci55 · line 18
  • RSI (rsi, ta.rsi in v5)close, 26rsi26 · line 19

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 dataema8EMA→ ema8sma26SMA→ sma26cci34CCI→ cci34cci55CCI→ cci55rsi26RSI→ rsi26longConditionlongConditionconditionshortConditionshortConditionconditionentry:My Long Entry IdOpen My Long Entry Idstrategy.entryentry:My Short Entry IdOpen My Short Entry Idstrategy.entry

Order rules

OrderFires whenBy defaultLine
Open My Long Entry Id long(longCondition)On27
Open My Short Entry Id short(shortCondition)On30

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.

Not measuredNo trades to compareThe last 300 bars, from 26 Dec 2025, were fed to the engine as live ticks, but neither the live nor the historical run produced any trades in them, so the replay says nothing either way.
  • 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+24.1%+102.5%650%1.6142.3%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h−20.0%+5.5%1020%0.4135.9%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+1.5%+9.8%450%2.072.6%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−0.3%+8.4%450%0.721.0%8 May 2026 – 21 Oct 2026
SOLUSDT 1D−0.0%+16.7%540%0.780.1%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h+0.0%+21.5%667%2.370.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D−0.0%+148.3%20%0.000.8%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h+0.1%+17.1%333%1.560.1%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 market2100%$15,108.60
Sideways market425%$8,953.25
Falling market0—$0.00

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

How bad could the drawdown be?

34.5%

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

0%40%
All 6 trades
SideEntryExitBarsP&L
long26 Mar 2024 69,880.0031 Mar 2025 82,390.00370$12,510.00
short31 Mar 2025 82,390.0011 Jun 2025 110,274.0072−$27,884.40
long11 Jun 2025 110,274.0020 Aug 2025 112,873.0070$2,598.56
short20 Aug 2025 112,873.002 Oct 2025 118,595.0043−$5,722.04
long2 Oct 2025 118,595.0015 Oct 2025 113,028.0013−$5,566.86
short15 Oct 2025 113,028.0010 Aug 2026 64,901.60299$48,126.50

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
Momentum Explosion 2CCI RSI this page—v4 strategy+24.1%642.3%
MACD, RSI, & RVOL Strategy by BobBarker42069rsi ema smav4 strategy+32.6%11.5%
Suchit RSI CCI by SuchitRajucci sma rsiv4 strategy+11.4%6854.7%
IFR2 - RSI2 by jocker.soadrsi sma emav4 strategyNo trades on this market
Vin's Playzone Strategy by Vvaz_ema rsi smav5 strategy−908.1%213,570.5%
3 x EMA + Stochastic RSI + ATR by tomimarsonema rsi smav4 strategy−42.3%1844.8%

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 9 msYes 1,000 bars in 20 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/// © capam//BUY//EMA 8 crosses upward SMA 26.//CCI 34 periods > 0//CCI 55 periods > 0//RSI 26 > 48.//Sell//EMA 8 crosses downward SMA 26.//CCI 34 periods < 0//CCI 55 periods < 0//RSI 26 < 48.//@version=4strategy("Momentum Explosion 2CCI RSI", overlay=true)ema8 = ema(close,8)sma26 = sma(close,26)cci34 = cci(close,34)cci55 = cci(close,55)rsi26 = rsi(close,26)//plot(ema8)//plot(sma26)//plot(cci34,color=color.green)//plot(cci55,color=color.orange)//plot(rsi26,color=color.red)longCondition = crossover(ema8, sma26) and mom(sma26,5)>0 and cci34>0 and cci55>0 and rsi26>48if (longCondition)    strategy.entry("My Long Entry Id", strategy.long)shortCondition = crossunder(ema8, sma26) and mom(sma26,5)<0 and cci34<0 and cci55<0 and rsi26<48if (shortCondition)    strategy.entry("My Short Entry Id", strategy.short)