Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

Jigga - Heatmap Comparision

A Pine Script v5 strategy built on RSI (closePrice, 14), EMA (closePrice, 20) and Change (time). It has 2 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 is one contract and pays no commission. 15 settings; defaults include Signal 14, Upper 55 and Lower 45.

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 Jigga - Heatmap Comparision repaint?
Yes
At least one pattern in the source can repaint: intrabar recalculation.
How did Jigga - Heatmap Comparision 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 entry conditions never all held on this data. It closed no trades on the other markets either. A backtest, not investment advice.
Does Jigga - Heatmap Comparision run in Pine Script v6?
No
The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L75:C149: 'fill' has no 'transp' parameter in Pine Script v6. Use color.new(color, transparency) instead. The v6 version is shown for reference and is not offered as a download.
Does Jigga - Heatmap Comparision use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Jigga - Heatmap Comparision run in Zeal Terminal?
Yes
It compiles in 34 ms and runs 1,000 bars in 119 ms, in the browser.

BTCUSDT · 1D · default settings

  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • HLine
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
NSE:CNXAUTONSE:CNXPHARMANSE:CNXITNSE:CNXFMCGNSE:CNXMETAL40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOctHLine$1,000,000$2,025,273Equity from $1,000,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. Lines, boxes and labels are the script's own drawings, the most recent ones its limits keep. Zeal Terminal's engine currently reads an order side written as direction = strategy.long as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 81) so the engine trades the way the script says. 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. The live re-run is not offered here: the script requests NSE:CNXMETAL D, NSE:CNXFMCG D, NSE:CNXIT D, NSE:CNXPHARMA D, NSE:CNXAUTO D, which this page cannot load in your browser.

Needs NSE:CNXMETAL D data, not available: not a Binance spot market Needs NSE:CNXFMCG D data, not available: not a Binance spot market Needs NSE:CNXIT D data, not available: not a Binance spot market Needs NSE:CNXPHARMA D data, not available: not a Binance spot market Needs NSE:CNXAUTO D data, not available: not a Binance spot market Values that depend on it are empty on this chart.

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

    1 setting does nothing

    “------------------------ INDEX ------------------------” is declared but never read.

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

Settings

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

SettingDefaultType and rangeFeeds
------------------------ RSI ------------------------trueboolline 25 line 28
Signal14intvrsi
Upper55intup
Lower45intup
------------------------ EMA CrossOver ------------------------falseboolline 25 line 31
Fast20intup
Slow50intup
------------------------ INDEX ------------------------falseboolunused
1NSE:CNXMETALsymbols1Close line 74
2NSE:CNXFMCGsymbols2Close line 73
3NSE:CNXITsymbols3Close line 72
4NSE:CNXPHARMAsymbols4Close line 71
5NSE:CNXAUTOsymbols5Close line 70
------------------------ Do BackTesting ------------------------falseboolentry In close In line 80 line 82
Buy sell based on sector #1int · options [1, 2, 3, 4, 5]refSectorup

What it calculates

  • RSIclosePrice, Signal (14)vrsi · line 22
  • EMAclosePrice, Fast (20)up · line 26
  • Changetimelapos_x · line 52
  • Highest5lapos_y · line 53

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.

length_RSISignalsetting · 14upperValueRSIUppersetting · 55fastMAFastsetting · 20slowMASlowsetting · 50lowerValueRSILowersetting · 45timetimeprice dataclosecloseprice datasymbol11setting · NSE:CNXMETALsymbol22setting · NSE:CNXFMCGsymbol33setting · NSE:CNXITsymbol44setting · NSE:CNXPHARMAsymbol55setting · NSE:CNXAUTOrefSectorBuy sell based on secto…setting · 1vrsiRSI→ vrsiupEMA→ uplapos_xChange→ lapos_xlapos_yHighest→ lapos_yclosePriceclosePricevalues1Closes1Closevalues2Closes2Closevalues3Closes3Closevalues4Closes4Closevalues5Closes5Closevalues1RSIups1RSIupvalues2RSIups2RSIupvalues3RSIups3RSIupvalues4RSIups4RSIupvalues5RSIups5RSIupvaluerefSectoruprefSectorupvaluesince_st_1_buy, since_st_1_sellsince_st_1_buy · since_…2 valuessince_st_2_buy, since_st_2_sellsince_st_2_buy · since_…2 valuessince_st_3_buy, since_st_3_sellsince_st_3_buy · since_…2 valuessince_st_4_buy, since_st_4_sellsince_st_4_buy · since_…2 valuessince_st_5_buy, since_st_5_sellsince_st_5_buy · since_…2 valuessince_st_buy, since_st_sellsince_st_buy · since_st…2 conditionsLabelColourLabelentry:InOpen Instrategy.entryclose:InClose Instrategy.closehline:46hlinehlinehline:47hlinehlinehline:48hlinehlinehline:49hlinehlinehline:50hlinehlinehline:51hlinehlinefill:Sector5Sector5fillfill:Sector4Sector4fillfill:Sector3Sector3fillfill:Sector2Sector2fillfill:Sector1Sector1fill

Order rules

OrderFires whenBy defaultLine
Open In longstrategy.position_size == 0 and refSectorup and doBackTestingOn81
Close Innot refSectorup and doBackTestingOn83

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.

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 data5 request.security call(s), none with lookahead on.
  • ClearFuture-bar referencesNo negative history offsets such as close[-1].
  • CheckIntrabar recalculationreads realtime-only state. Live values can differ from history.
  • 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 NSE:CNXMETAL D, NSE:CNXFMCG D, NSE:CNXIT D, NSE:CNXPHARMA D, NSE:CNXAUTO D, and that data is not available here (not a Binance spot market; not a Binance spot market; not a Binance spot market; not a Binance spot market; not a Binance spot market). Its results would rest on empty values.

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
Jigga - Heatmap Comparision this page—v5 strategy0.0%00.0%
STRATEGY R18-F-BTC by SenatorVonShaftema highest rsiv4 strategy−8.6%1114.4%
RSI Cross [xaurr] by livetrendrsi emav4 strategy+24.4%5335.3%
IFR2 by EduardoMattjersi highestv4 strategy+12.1%1180.8%
Bitpanda Coinrule Template by joshuajcoop01rsi emav5 strategy−2.8%44.6%
RSI with Slow and Fast MA Crossing Strategy (by Coinrule) by Coinrulersi emav5 strategy−2.8%44.6%

Upgrade and export

Written in Pine Script v5. The clean-v5 step types the settings and moves when = into if blocks, which v6 requires; it is run before and after like any upgrade.

  • 4 settings use the untyped input() (line 5, 9, 12, 18). It still compiles in v6; input.int, input.float or input.source state the type.
  • No v6-only features. v6 is not needed to run this script.

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 9: input() → input.bool()
  • Line 12: input() → input.bool()
  • Line 18: input() → input.bool()
⋯strategy('Jigga - Heatmap Comparision', overlay=false)-checkRSI = input(true, title='------------------------   RSI     ------------------------')+checkRSI = input.bool(true, title='------------------------   RSI     ------------------------')length_RSI = input.int(14, title='Signal', inline='RSI')⋯lowerValueRSI = input.int(45, title='Lower', inline='RSI')-checkMA = input(false, title='------------------------   EMA CrossOver     ------------------------')+checkMA = input.bool(false, title='------------------------   EMA CrossOver     ------------------------')fastMA = input.int(20, title='Fast', inline='EMA Crossover')slowMA = input.int(50, title='Slow', inline='EMA Crossover')-includeIndex = input(false, title='------------------------   INDEX     ------------------------')+includeIndex = input.bool(false, title='------------------------   INDEX     ------------------------')symbol1 = input.symbol(title='1', defval='NSE:CNXMETAL', inline='Symbol')⋯symbol5 = input.symbol(title='5', defval='NSE:CNXAUTO', inline='Symbol')-doBackTesting = input(false, title='------------------------   Do BackTesting     ------------------------')+doBackTesting = input.bool(false, title='------------------------   Do BackTesting     ------------------------')refSector = input.int(title='Buy sell based on sector #', defval=1, options=[1, 2, 3, 4, 5])⋯

Does it run in Pine Script v6?

No

The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L75:C149: 'fill' has no 'transp' parameter in Pine Script v6. Use color.new(color, transparency) instead. The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯// © jigneshjc-//@version=5+//@version=6strategy('Jigga - Heatmap Comparision', overlay=false)⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 34 msWith a workaround 1,000 bars in 119 msNot measured
PineTSNot testedNot testedNot measured

Zeal Terminal's engine currently reads an order side written as direction = strategy.long as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 81) so the engine trades the way the script says. 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.

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

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/// © jigneshjc//@version=5strategy('Jigga - Heatmap Comparision', overlay=false)checkRSI = input(true, title='------------------------   RSI     ------------------------')length_RSI = input.int(14, title='Signal', inline='RSI')upperValueRSI = input.int(55, title='Upper', inline='RSI')lowerValueRSI = input.int(45, title='Lower', inline='RSI')checkMA = input(false, title='------------------------   EMA CrossOver     ------------------------')fastMA = input.int(20, title='Fast', inline='EMA Crossover')slowMA = input.int(50, title='Slow', inline='EMA Crossover')includeIndex = input(false, title='------------------------   INDEX     ------------------------')symbol1 = input.symbol(title='1', defval='NSE:CNXMETAL', inline='Symbol')symbol2 = input.symbol(title='2', defval='NSE:CNXFMCG', inline='Symbol')symbol3 = input.symbol(title='3', defval='NSE:CNXIT', inline='Symbol')symbol4 = input.symbol(title='4', defval='NSE:CNXPHARMA', inline='Symbol')symbol5 = input.symbol(title='5', defval='NSE:CNXAUTO', inline='Symbol')doBackTesting = input(false, title='------------------------   Do BackTesting     ------------------------')refSector = input.int(title='Buy sell based on sector #', defval=1, options=[1, 2, 3, 4, 5])updown(price) =>    closePrice = price    vrsi = ta.rsi(closePrice, length_RSI)    up = false    down = false    if checkRSI and checkMA        up := vrsi > upperValueRSI and ta.ema(closePrice, fastMA) > ta.ema(closePrice, slowMA) ? true : vrsi < lowerValueRSI and ta.ema(closePrice, fastMA) < ta.ema(closePrice, slowMA) ? false : up[1]        up    else if checkRSI        up := vrsi > upperValueRSI ? true : vrsi < lowerValueRSI ? false : up[1]        up    else if checkMA        up := ta.ema(closePrice, fastMA) > ta.ema(closePrice, slowMA) ? true : false        up    ups1Close = request.security(symbol1, timeframe.period, close)s2Close = request.security(symbol2, timeframe.period, close)s3Close = request.security(symbol3, timeframe.period, close)s4Close = request.security(symbol4, timeframe.period, close)s5Close = request.security(symbol5, timeframe.period, close)s1RSIup = updown(s1Close)s2RSIup = updown(s2Close)s3RSIup = updown(s3Close)s4RSIup = updown(s4Close)s5RSIup = updown(s5Close)refSectorup = refSector == 1 ? s1RSIup : refSector == 2 ? s2RSIup : refSector == 3 ? s2RSIup : refSector == 4 ? s4RSIup : s5RSIuph0 = hline(1, color=color.new(color.black, 10), linewidth=2, linestyle=hline.style_solid)h1 = hline(2, color=color.new(color.black, 10), linewidth=2, linestyle=hline.style_solid)h2 = hline(3, color=color.new(color.black, 10), linewidth=2, linestyle=hline.style_solid)h3 = hline(4, color=color.new(color.black, 10), linewidth=2, linestyle=hline.style_solid)h4 = hline(5, color=color.new(color.black, 10), linewidth=2, linestyle=hline.style_solid)h5 = hline(6, color=color.new(color.black, 10), linewidth=2, linestyle=hline.style_solid)lapos_x = timenow + math.round(ta.change(time) * 20)lapos_y = ta.highest(5)  // + (0.15 * highest(20))get_bars(Trend) =>    since_st_buy = ta.barssince(Trend == true)    since_st_sell = ta.barssince(Trend == false)    [since_st_buy, since_st_sell][since_st_1_buy, since_st_1_sell] = get_bars(s5RSIup)[since_st_2_buy, since_st_2_sell] = get_bars(s4RSIup)[since_st_3_buy, since_st_3_sell] = get_bars(s3RSIup)[since_st_4_buy, since_st_4_sell] = get_bars(s2RSIup)[since_st_5_buy, since_st_5_sell] = get_bars(s1RSIup)heatmap_color(cond1, cond2, colorValue) =>    cond1 ? colorValue : cond2 ? color.new(color.silver, 20) : naf_draw_label(x, y, _text, _textcolor, _size) =>    var label Label = na    label.delete(Label)    Label := label.new(x, y, _text, color=color.new(color.white, 20), textcolor=_textcolor, style=label.style_none, yloc=yloc.price, xloc=xloc.bar_time, size=_size)    Labelf_draw_label(lapos_x, 1, symbol5, color.black, size.large)f_draw_label(lapos_x, 2, symbol4, color.black, size.large)f_draw_label(lapos_x, 3, symbol3, color.black, size.large)f_draw_label(lapos_x, 4, symbol2, color.black, size.large)f_draw_label(lapos_x, 5, symbol1, color.black, size.large)fill(h0, h1, color=heatmap_color(since_st_1_sell > since_st_1_buy, since_st_1_sell < since_st_1_buy, color.new(color.fuchsia, 20)), title='Sector5', transp=90)fill(h1, h2, color=heatmap_color(since_st_2_sell > since_st_2_buy, since_st_2_sell < since_st_2_buy, color.new(color.yellow, 20)), title='Sector4', transp=90)fill(h2, h3, color=heatmap_color(since_st_3_sell > since_st_3_buy, since_st_3_sell < since_st_3_buy, color.new(color.lime, 20)), title='Sector3', transp=90)fill(h3, h4, color=heatmap_color(since_st_4_sell > since_st_4_buy, since_st_4_sell < since_st_4_buy, color.new(color.orange, 20)), title='Sector2', transp=90)fill(h4, h5, color=heatmap_color(since_st_5_sell > since_st_5_buy, since_st_5_sell < since_st_5_buy, color.new(color.blue, 20)), title='Sector1', transp=90)if strategy.position_size == 0 and refSectorup and doBackTesting    strategy.entry(id='In', direction=strategy.long)if not refSectorup and doBackTesting    strategy.close('In')