Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

Ichimoku + RSI Crypto trending strategy

A Pine Script v4 strategy built on Change (haClose) and RMA (gain, 14). It has 4 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 0.1% commission. 14 settings; defaults include Tenkan-Sen Bars 20, Kijun-Sen Bars 50 and Senkou-Span B Bars 120.

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 Ichimoku + RSI Crypto trending strategy repaint?
No
No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
How did Ichimoku + RSI Crypto trending strategy do on BTCUSDT 1D with default settings?
Not measured
It closed no trades there from 26 Jan 2024 to 21 Oct 2026 with the default settings, so there is no result to report. Its code limits trading to a date window, which can leave this period out. It closed no trades on the other markets either. A backtest, not investment advice.
Can Ichimoku + RSI Crypto trending strategy be converted to Pine Script v5?
Not tested
The steps are shown below, but neither version placed a trade on any market tested, so there was nothing to compare and no download is offered.
Does Ichimoku + RSI Crypto trending strategy use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Ichimoku + RSI Crypto trending strategy run in Zeal Terminal?
Yes
It compiles in 12 ms and runs 1,000 bars in 68 ms, in the browser.

BTCUSDT · 1D · default settings

  • Change
  • RMA
  • RMA
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
0.0050,000100,000AprJulOct2025AprJulOct2026AprJulOct$1,000$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. The script plots nothing itself; the lines and the lower pane are its own calculations, drawn for reference. The engine's host API cannot yet declare a chart's symbol and timeframe, so this page sets them on the engine directly for each market. Data the page supplies at the chart's own timeframe (another symbol, or Heikin-Ashi) reaches the script one bar later in Zeal Terminal's engine than on TradingView. The live re-run is not offered here: the script requests heikinashi:SYMBOL D, heikinashi:BINANCE:BTCUSDT D, which this page cannot load in your browser.
Net profit
0.00%
$0.00
Buy and hold
+102.5%
same period
Closed trades
0
0 won · 0 lost
Profitable
0.0%
of closed trades
Profit factor
—
gross profit ÷ gross loss
Max drawdown
0.00%
$0.00

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

Review

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

  • Check

    No stop loss

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

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

  • Note

    Uses an argument v6 removed

    when = on line 73, 74, 75, 76. The upgraded version below moves each call inside an if block.

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 security → request.security, heikinashi → ticker.heikinashi, avg → math.avg, lowest → ta.lowest, highest → ta.highest, change → ta.change, rma → ta.rma, max → math.max, min → math.min, mom → ta.mom.
  • 4 strategy calls use the when = argument (line 73, 74, 75, 76). It is deprecated in v5 and removed in v6, where each call moves inside an if block.

v4 → v5

Not verified

Neither version placed a trade on any of the 8 markets, so there was nothing to compare.

  • Line 3: //@version=4 → //@version=5
  • Line 9: security → request.security
  • Line 9: heikinashi → ticker.heikinashi
  • Line 10: security → request.security
  • Line 10: heikinashi → ticker.heikinashi
  • Line 11: security → request.security
14 more edits
  • Line 11: heikinashi → ticker.heikinashi
  • Line 12: security → request.security
  • Line 12: heikinashi → ticker.heikinashi
  • Line 46: avg → math.avg
  • Line 46: lowest → ta.lowest
  • Line 46: highest → ta.highest
  • Line 50: avg → math.avg
  • Line 53: change → ta.change
  • Line 56: rma → ta.rma
  • Line 57: rma → ta.rma
  • Line 60: max → math.max
  • Line 61: min → math.min
  • Line 65: mom → ta.mom
  • Line 66: mom → ta.mom
⋯// © exlux99-//@version=4+//@version=5strategy(title="Ichimoku + RSI Crypto trending strategy", overlay=true, initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, pyramiding=1  )⋯// === BASE FUNCTIONS ===-haClose = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, close) : close+haClose = UseHAcandles ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close) : close-haOpen  = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, open) : open+haOpen  = UseHAcandles ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, open) : open-haHigh  = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, high) : high+haHigh  = UseHAcandles ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, high) : high-haLow   = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, low) : low+haLow   = UseHAcandles ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, low) : low//Inputs⋯////////////////////////////////////////////////////////////////////////////////-middle(len) => avg(lowest(len), highest(len))+middle(len) => math.avg(ta.lowest(len), ta.highest(len))// Ichimoku Components⋯kijun = middle(ks_bars)-senkouA = avg(tenkan, kijun)+senkouA = math.avg(tenkan, kijun)senkouB = middle(ssb_bars)//RSI-change = change(haClose)+change = ta.change(haClose)gain = change >= 0 ? change : 0.0loss = change < 0 ? (-1) * change : 0.0-avgGain = rma(gain, 14)+avgGain = ta.rma(gain, 14)-avgLoss = rma(loss, 14)+avgLoss = ta.rma(loss, 14)rs = avgGain / avgLossrsi = 100 - (100 / (1 + rs))-ss_high = max(senkouA[ss_offset-1], senkouB[ss_offset-1])+ss_high = math.max(senkouA[ss_offset-1], senkouB[ss_offset-1])-ss_low = min(senkouA[ss_offset-1], senkouB[ss_offset-1])+ss_low = math.min(senkouA[ss_offset-1], senkouB[ss_offset-1])// Entry/Exit Signals⋯tk_cross_bear = tenkan < kijun-cs_cross_bull = mom(haClose, cs_offset-1) > 0+cs_cross_bull = ta.mom(haClose, cs_offset-1) > 0-cs_cross_bear = mom(haClose, cs_offset-1) < 0+cs_cross_bear = ta.mom(haClose, cs_offset-1) < 0price_above_kumo = haClose > ss_high⋯

Clean v5

Not verified

Neither version placed a trade on any of the 8 markets, so there was nothing to compare.

  • Line 5: input() → input.bool()
  • Line 14: input() → input.int()
  • Line 15: input() → input.int()
  • Line 16: input() → input.int()
  • Line 17: input() → input.int()
  • Line 18: input() → input.int()
12 more edits
  • Line 19: input() → input.bool()
  • Line 20: input() → input.bool()
  • Line 31: input() → input.int()
  • Line 32: input() → input.int()
  • Line 33: input() → input.int()
  • Line 36: input() → input.int()
  • Line 37: input() → input.int()
  • Line 38: input() → input.int()
  • Line 73: when = bullish and long_entry and time_cond → if block
  • Line 74: when = bearish and short_entry and time_cond → if block
  • Line 75: when = bearish and not short_entry and time_cond → if block
  • Line 76: when = bullish and not long_entry and time_cond → if block
⋯strategy(title="Ichimoku + RSI Crypto trending strategy", overlay=true, initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, pyramiding=1  )-UseHAcandles    = input(true, title="Use Heikin Ashi Candles in Algo Calculations")+UseHAcandles    = input.bool(true, title="Use Heikin Ashi Candles in Algo Calculations")//⋯//Inputs-ts_bars = input(20, minval=1, title="Tenkan-Sen Bars")+ts_bars = input.int(20, minval=1, title="Tenkan-Sen Bars")-ks_bars = input(50, minval=1, title="Kijun-Sen Bars")+ks_bars = input.int(50, minval=1, title="Kijun-Sen Bars")-ssb_bars = input(120, minval=1, title="Senkou-Span B Bars")+ssb_bars = input.int(120, minval=1, title="Senkou-Span B Bars")-cs_offset = input(30, minval=1, title="Chikou-Span Offset")+cs_offset = input.int(30, minval=1, title="Chikou-Span Offset")-ss_offset = input(30, minval=1, title="Senkou-Span Offset")+ss_offset = input.int(30, minval=1, title="Senkou-Span Offset")-long_entry = input(true, title="Long Entry")+long_entry = input.bool(true, title="Long Entry")-short_entry = input(true, title="Short Entry")+short_entry = input.bool(true, title="Short Entry")//Volatility⋯// From Date Inputs-fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)+fromDay = input.int(defval = 1, title = "From Day", minval = 1, maxval = 31)-fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)+fromMonth = input.int(defval = 1, title = "From Month", minval = 1, maxval = 12)-fromYear = input(defval = 2019, title = "From Year", minval = 1970)+fromYear = input.int(defval = 2019, title = "From Year", minval = 1970) // To Date Inputs-toDay = input(defval = 31, title = "To Day", minval = 1, maxval = 31)+toDay = input.int(defval = 31, title = "To Day", minval = 1, maxval = 31)-toMonth = input(defval = 12, title = "To Month", minval = 1, maxval = 12)+toMonth = input.int(defval = 12, title = "To Month", minval = 1, maxval = 12)-toYear = input(defval = 2021, title = "To Year", minval = 1970)+toYear = input.int(defval = 2021, title = "To Year", minval = 1970) ⋯bearish = tk_cross_bear and cs_cross_bear and price_below_kumo and rsi_bearish //and highvolatility-strategy.entry("Long", strategy.long, when=bullish and long_entry and time_cond)+if bullish and long_entry and time_cond+    strategy.entry("Long", strategy.long)-strategy.entry("Short", strategy.short, when=bearish and short_entry and time_cond)+if bearish and short_entry and time_cond+    strategy.entry("Short", strategy.short)-strategy.close("Long", when=bearish and not short_entry and time_cond)+if bearish and not short_entry and time_cond+    strategy.close("Long")-strategy.close("Short", when=bullish and not long_entry and time_cond)+if bullish and not long_entry and time_cond+    strategy.close("Short")

Does it run in Pine Script v6?

Not tested

Neither version placed a trade on any of the 8 markets, so there was nothing to compare. The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯// © exlux99-//@version=5+//@version=6strategy(title="Ichimoku + RSI Crypto trending strategy", overlay=true, initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, pyramiding=1  )⋯

Settings

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

SettingDefaultType and rangeFeeds
Use Heikin Ashi Candles in Algo CalculationstrueboolhaClose haOpen haHigh haLow
Tenkan-Sen Bars20int · min 1tenkan
Kijun-Sen Bars50int · min 1kijun
Senkou-Span B Bars120int · min 1senkouB
Chikou-Span Offset30int · min 1cs_cross_bull cs_cross_bear
Senkou-Span Offset30int · min 1ss_high ss_low
Long Entrytrueboolentry Long close Short
Short Entrytrueboolentry Short close Long
From Day1int · min 1 · max 31startDate
From Month1int · min 1 · max 12startDate
From Year2019int · min 1970startDate
To Day31int · min 1 · max 31finishDate
To Month12int · min 1 · max 12finishDate
To Year2021int · min 1970finishDate

What it calculates

  • Change (change, ta.change in v5)haClosechange · line 53
  • RMA (rma, ta.rma in v5)gain, 14avgGain · line 56
  • RMA (rma, ta.rma in v5)loss, 14avgLoss · line 57

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 dataopenopenprice datahighhighprice datalowlowprice datafromYearFrom Yearsetting · 2019fromMonthFrom Monthsetting · 1fromDayFrom Daysetting · 1toYearTo Yearsetting · 2021toMonthTo Monthsetting · 12toDayTo Daysetting · 31ts_barsTenkan-Sen Barssetting · 20ks_barsKijun-Sen Barssetting · 50ssb_barsSenkou-Span B Barssetting · 120ss_offsetSenkou-Span Offsetsetting · 30timetimeprice datacs_offsetChikou-Span Offsetsetting · 30changeChange→ changeavgGainRMA→ avgGainavgLossRMA→ avgLosshaClosehaClosevaluehaOpenhaOpenvaluehaHighhaHighvaluehaLowhaLowvaluestartDatestartDatevaluefinishDatefinishDatevaluetenkantenkanvaluekijunkijunvaluesenkouAsenkouAvaluesenkouBsenkouBvaluegain, lossgain · loss2 valuesrsrsvaluersirsivaluess_high, ss_lowss_high · ss_low2 valuestime_condtime_condconditiontk_cross_bull, tk_cross_beartk_cross_bull · tk_cros…2 conditionscs_cross_bull, cs_cross_bearcs_cross_bull · cs_cros…2 conditionsprice_above_kumo, price_below_kumoprice_above_kumo · pric…2 conditionsrsi_bullishrsi_bullishconditionrsi_bearishrsi_bearishconditionbullishbullishconditionbearishbearishconditionentry:LongOpen Longstrategy.entryentry:ShortOpen Shortstrategy.entryclose:LongClose Longstrategy.closeclose:ShortClose Shortstrategy.close

Order rules

OrderFires whenBy defaultLine
Open Long longbullish and long_entry and time_condOn73
Open Short shortbearish and short_entry and time_condOn74
Close Longbearish and not short_entry and time_condOn75
Close Shortbullish and not long_entry and time_condOn76

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 data4 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

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 1D0.0%+102.5%00%—0.0%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h0.0%+5.5%00%—0.0%8 May 2026 – 21 Oct 2026
ETHUSDT 1D0.0%+9.8%00%—0.0%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h0.0%+8.4%00%—0.0%8 May 2026 – 21 Oct 2026
SOLUSDT 1D0.0%+16.7%00%—0.0%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h0.0%+21.5%00%—0.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D0.0%+148.3%00%—0.0%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h0.0%+17.1%00%—0.0%8 May 2026 – 21 Oct 2026

Higher-timeframe data for request.security(): heikinashi:SYMBOL D (Binance BTCUSDT 1d, as Heikin-Ashi by the engine), heikinashi:BINANCE:BTCUSDT D (Binance BTCUSDT 1d, as Heikin-Ashi by the engine), fetched from Binance's public market data for each market.

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

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
Ichimoku + RSI Crypto trending strategy this page—v4 strategy0.0%00.0%
DMI Strategy by email_analystsrmav5 strategy+8.5%62.7%
Simple and efficient 1h strategy by SoftKill21rmav4 strategyNo trades on this market
DI Crossing Daily Straregy HulkTrading by TheHulkTradingrmav4 strategy+34.3%6518.4%
Kimchi Premium Strategy by chanu_lev10krmav5 strategyNo trades on this market
Infiten Slope Strategy by spiritualhealer117rmav4 strategy+47.2%2635.5%

Where it runs

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

The engine's host API cannot yet declare a chart's symbol and timeframe, so this page sets them on the engine directly for each market. Data the page supplies at the chart's own timeframe (another symbol, or Heikin-Ashi) reaches the script one bar later in Zeal Terminal's engine than on TradingView.

“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/// © exlux99//@version=4strategy(title="Ichimoku + RSI Crypto trending strategy", overlay=true, initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, pyramiding=1  )UseHAcandles    = input(true, title="Use Heikin Ashi Candles in Algo Calculations")//// === /INPUTS ===// === BASE FUNCTIONS ===haClose = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, close) : closehaOpen  = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, open) : openhaHigh  = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, high) : highhaLow   = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, low) : low//Inputsts_bars = input(20, minval=1, title="Tenkan-Sen Bars")ks_bars = input(50, minval=1, title="Kijun-Sen Bars")ssb_bars = input(120, minval=1, title="Senkou-Span B Bars")cs_offset = input(30, minval=1, title="Chikou-Span Offset")ss_offset = input(30, minval=1, title="Senkou-Span Offset")long_entry = input(true, title="Long Entry")short_entry = input(true, title="Short Entry")//Volatility//vollength = input(defval=1, title="VolLength")//voltarget = input(defval=0., type=input.float, step=0.1, title="Volatility Target")//Difference = abs((haClose - haOpen)/((haClose + haOpen)/2) * 100)//MovingAverage = sma(Difference, vollength)//highvolatility = MovingAverage > voltarget////////////////////////////////////////////////////////////////////////////////// BACKTESTING RANGE // From Date InputsfromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)fromYear = input(defval = 2019, title = "From Year", minval = 1970) // To Date InputstoDay = input(defval = 31, title = "To Day", minval = 1, maxval = 31)toMonth = input(defval = 12, title = "To Month", minval = 1, maxval = 12)toYear = input(defval = 2021, title = "To Year", minval = 1970) // Calculate start/end date and time conditionstartDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)finishDate = timestamp(toYear, toMonth, toDay, 00, 00)time_cond = time >= startDate and time <= finishDate ////////////////////////////////////////////////////////////////////////////////middle(len) => avg(lowest(len), highest(len))// Ichimoku Componentstenkan = middle(ts_bars)kijun = middle(ks_bars)senkouA = avg(tenkan, kijun)senkouB = middle(ssb_bars)//RSIchange = change(haClose)gain = change >= 0 ? change : 0.0loss = change < 0 ? (-1) * change : 0.0avgGain = rma(gain, 14)avgLoss = rma(loss, 14)rs = avgGain / avgLossrsi = 100 - (100 / (1 + rs))ss_high = max(senkouA[ss_offset-1], senkouB[ss_offset-1])ss_low = min(senkouA[ss_offset-1], senkouB[ss_offset-1])// Entry/Exit Signalstk_cross_bull = tenkan > kijuntk_cross_bear = tenkan < kijuncs_cross_bull = mom(haClose, cs_offset-1) > 0cs_cross_bear = mom(haClose, cs_offset-1) < 0price_above_kumo = haClose > ss_highprice_below_kumo = haClose < ss_lowrsi_bullish = rsi > 50rsi_bearish = rs < 50bullish = tk_cross_bull and cs_cross_bull and price_above_kumo and rsi_bullish //and highvolatilitybearish = tk_cross_bear and cs_cross_bear and price_below_kumo and rsi_bearish //and highvolatilitystrategy.entry("Long", strategy.long, when=bullish and long_entry and time_cond)strategy.entry("Short", strategy.short, when=bearish and short_entry and time_cond)strategy.close("Long", when=bearish and not short_entry and time_cond)strategy.close("Short", when=bullish and not long_entry and time_cond)