Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

Daily_Mid Term_Consulting BOLT

A Pine Script v5 strategy built on SMA (close, 1) and RSI (close, 9). 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 is one contract and pays no commission. 12 settings; defaults include longitud_sma 58, Length1 18 and Length2 18.

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 Daily_Mid Term_Consulting BOLT repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 2 of 2 trades.
How did Daily_Mid Term_Consulting BOLT do on BTCUSDT 1D with default settings?
−1.88%
From 26 Jan 2024 to 21 Oct 2026, over 8 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Does Daily_Mid Term_Consulting BOLT 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: 8 before, 48 after on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine. It is shown for reference and is not offered as a download.
Does Daily_Mid Term_Consulting BOLT use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Daily_Mid Term_Consulting BOLT run in Zeal Terminal?
Yes
It compiles in 29 ms and runs 1,000 bars in 67 ms, in the browser.

BTCUSDT · 1D · default settings

  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • HLine
  • HLine
  • Plot
  • Winning trade
Prerendered with the defaults. Change anything and run it here. The script runs in your browser.
Settings (12)
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOctPlot$981,184$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.
Net profit
−1.88%
−$18,818.70
Buy and hold
+102.5%
same period
Closed trades
8
1 won · 7 lost
Profitable
12.5%
of closed trades
Profit factor
0.39
gross profit ÷ gross loss
Max drawdown
3.81%
−$38,086.10

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.

  • Likely bug

    ta.sma(close, 1) ignores the settings line 7

    Line 7 hard-codes 1 where line 20 uses “Length1”. Changing those settings moves one band but not this one.

    ta.sma(close, 1)ta.sma(close, Length1)
  • Likely bug

    ta.sma(low, 1) ignores the settings line 8

    Line 8 hard-codes 1 where line 20 uses “Length1”. Changing those settings moves one band but not this one.

    ta.sma(low, 1)ta.sma(low, Length1)
  • Likely bug

    ta.sma(porcentaje, 333) ignores the settings line 48

    Line 48 hard-codes 333 where line 20 uses “Length1”. Changing those settings moves one band but not this one.

    ta.sma(porcentaje, 333)ta.sma(porcentaje, Length1)
  • 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

    11 settings have no label

    In the settings dialog Length1 (line 9), Length2 (line 10), Length3 (line 11), Length4 (line 12), Length5 (line 13), Length6 (line 14), Length7 (line 15), Length8 (line 16), Length9 (line 17), Length10 (line 18), Length11 (line 19) show an empty name. The labels on this page come from the variable names.

  • 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 52, 53, 57, 58. The upgraded version below moves each call inside an if block.

Settings

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

SettingDefaultType and rangeFeeds
longitud_sma58intma
Length1 (no label in the script)18intma1
Length2 (no label in the script)18intma2
Length3 (no label in the script)26intma3
Length4 (no label in the script)36intma4
Length5 (no label in the script)78intma5
Length6 (no label in the script)1intma6
Length7 (no label in the script)1500intma7
Length8 (no label in the script)58intma8
Length9 (no label in the script)3000intma9
Length10 (no label in the script)2intma10
Length11 (no label in the script)14intma11

What it calculates

  • SMAclose, 1px · line 7
  • SMAlow, 1px2 · line 8
  • SMAlow, Length1 (18)ma1 · line 20
  • SMAhigh, Length2 (18)ma2 · line 21
  • SMAclose, Length3 (26)ma3 · line 22
  • SMAclose, Length4 (36)ma4 · line 23
  • SMAclose, Length5 (78)ma5 · line 24
  • SMAclose, Length6 (1)ma6 · line 25
  • SMAclose, Length7 (1500)ma7 · line 26
  • SMAclose, Length8 (58)ma8 · line 27
  • SMAclose, Length9 (3000)ma9 · line 28
  • SMAclose, Length10 (2)ma10 · line 29
  • SMAclose, Length11 (14)ma11 · line 30
  • RSIclose, 9rsi · line 43
  • SMAclose, longitud_sma (58)ma · line 45
  • SMAporcentaje, 333ma_dista · line 48

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.

The script has 66 named inputs, calculations, conditions and outputs, too many to draw legibly here; the tables above list them.

Order rules

OrderFires whenBy defaultLine
Open BUY longlongma1[1] < ma1 and ma2[1] < ma2 and macd > 0 and px > ma3 and efi_indicador < 9 and px > ma7 and macd[1] < macdOn52
Close BUYclongefi_indicador > 22000 and px < ma8On53
Open SELL shortshortma1[1] > ma1 and ma2[1] > ma2 and macd < 0 and px < ma3 and efi_indicador > 9 and macd[1] > macdOn57
Close SELLcshortefi_indicador < 14000 and px > ma8 and ma11 > desvOn58

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.

2/2trades 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 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−1.9%+102.5%813%0.393.8%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h+0.8%+5.5%933%2.400.4%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+0.2%+9.8%667%4.370.0%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h+0.0%+8.4%825%1.760.0%8 May 2026 – 21 Oct 2026
SOLUSDT 1D−0.0%+16.7%1030%0.460.0%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h+0.0%+21.5%650%7.390.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D−0.0%+148.3%813%0.070.0%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h−0.0%+17.1%825%0.260.0%8 May 2026 – 21 Oct 2026

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

Settings heatmap

Two settings that feed the entry signal, moved around their defaults. The best in-sample pair (longitud_sma 29, Length1 9) made −1.3% before 26 Dec 2025 and −0.7% after it, worse than the defaults' −0.2% after. Tuning on the past did not carry forward. 0% of the 64 combinations made money in-sample and 0% out-of-sample.

Before 26 Dec 2025 · in-sample
Length1 ↓ · longitud_sma →2935414958708199
9−1%−1%−1%−1%−1%−1%−1%−1%
11−2%−2%−2%−2%−2%−2%−2%−2%
13−2%−2%−2%−2%−2%−2%−2%−2%
15−2%−2%−2%−2%−2%−2%−2%−2%
18−2%−2%−2%−2%−2%−2%−2%−2%
22−2%−2%−2%−2%−2%−2%−2%−2%
25−2%−2%−2%−2%−2%−2%−2%−2%
31−2%−2%−2%−2%−2%−2%−2%−2%
From 26 Dec 2025 · out-of-sample
Length1 ↓ · longitud_sma →2935414958708199
9−1%−1%−1%−1%−1%−1%−1%−1%
11−0%−0%−0%−0%−0%−0%−0%−0%
13−1%−1%−1%−1%−1%−1%−1%−1%
15−0%−0%−0%−0%−0%−0%−0%−0%
18−0%−0%−0%−0%−0%−0%−0%−0%
22−0%−0%−0%−0%−0%−0%−0%−0%
25−0%−0%−0%−0%−0%−0%−0%−0%
31−0%−0%−0%−0%−0%−0%−0%−0%

Net P&L of trades opened in each period, as a share of starting capital. marks the defaults and the best in-sample cell. Hover a cell for its trade count. Backtests are simulations on historical data and are not investment advice.

The trades

By market direction

At entry, last 90 barsTradesWonP&L
Rising market10%−$5,406.52
Sideways market520%−$2,507.17
Falling market20%−$10,905.00

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

How bad could the drawdown be?

3.1%

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

0%4%
All 8 trades
SideEntryExitBarsP&L
short11 May 2024 60,800.0016 May 2024 66,206.505−$5,406.52
short8 Jul 2024 55,857.8017 Jul 2024 65,044.009−$9,186.19
short6 Aug 2024 54,018.8024 Aug 2024 64,037.2018−$10,018.40
short29 Aug 2024 59,034.9019 Sep 2024 61,760.0021−$2,725.08
short27 Feb 2025 84,250.1020 Apr 2025 85,077.0052−$826.91
short8 Nov 2025 103,339.005 Jan 2026 91,529.7058$11,809.30
short5 Feb 2026 73,165.8017 Mar 2026 74,884.7040−$1,718.83
short18 Jun 2026 64,509.4021 Jul 2026 65,255.5033−$746.11

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
Daily_Mid Term_Consulting BOLT this page—v5 strategy−1.9%83.8%
SRJ RSI Outperformer Strategy by Sapt_Jashrsi smav5 strategy+0.6%82.4%
RSI SMA Crossover Strategy by reeesrsi smav5 strategy+39.8%4230.8%
Short In Downtrend Below MA100 (Coinrule) by Coinrulesma rsiv4 strategy−34.5%9945.4%
Simple RSI and SMA Long and Short (by Coinrule) by Coinrulersi smav5 strategy−3.0%217.7%
Maximized Moving Average Crossing (by Coinrule) by Coinrulesma rsiv4 strategy−6.6%913.3%

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 strategy calls use the when = argument (line 52, 53, 57, 58). It is deprecated in v5 and removed in v6, where each call moves inside an if block.
  • 1 setting uses the untyped input() (line 6). 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

VerifiedDownload the v5 script

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

  • Line 6: input() → input.int()
  • Line 52: when = long → if block
  • Line 53: when = clong → if block
  • Line 57: when = short → if block
  • Line 58: when = cshort → if block
⋯//calculo longuitud-longuitud = input(58, title= "longitud_sma")+longuitud = input.int(58, title= "longitud_sma")px = ta.sma(close, 1)⋯clong = efi_indicador > 22000 and px < ma8-strategy.entry("BUY", strategy.long, when = long)+if long+    strategy.entry("BUY", strategy.long)-strategy.close("BUY", when = clong)+if clong+    strategy.close("BUY")//condición de entrada y salida short⋯cshort =  efi_indicador < 14000 and px > ma8 and ma11 > desv-strategy.entry("SELL", strategy.short, when = short)+if short+    strategy.entry("SELL", strategy.short)-strategy.close("SELL", when = cshort)+if cshort+    strategy.close("SELL")//SL Y TP⋯

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

⋯// © murdocksilva-//@version=5+//@version=6strategy("Daily_Mid Term_Consulting BOLT")⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 29 msYes 1,000 bars in 67 msNot measured
PineTSNot testedNot testedNot 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.

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/// © murdocksilva//@version=5strategy("Daily_Mid Term_Consulting BOLT")//calculo longuitudlonguitud = input(58, title= "longitud_sma")px = ta.sma(close, 1)px2 = ta.sma(low, 1)Length1 = input.int(18)Length2 = input.int(18)Length3 = input.int(26)Length4 = input.int(36)Length5 = input.int(78)Length6 = input.int(1)Length7 = input.int(1500)Length8 = input.int(58)Length9 = input.int(3000)Length10 = input.int(2)Length11 = input.int(14)ma1 = ta.sma(low, Length1)ma2 = ta.sma(high, Length2)ma3 = ta.sma(close, Length3)ma4 = ta.sma(close, Length4)ma5 = ta.sma(close, Length5)ma6 = ta.sma(close, Length6)ma7 = ta.sma(close, Length7)ma8 = ta.sma(close, Length8)ma9 = ta.sma(close, Length9)ma10 = ta.sma(close, Length10)ma11 = ta.sma(close, Length11)// calculo EFIefi = (close[1]-close) * volume / 1000efi_indicador = (efi[1] + efi) / 2//Variable  RSI - calculo desv estandarb = (px-ma10)*(px-ma10)b2 = (px[1]-ma10[1])*(px[1]-ma10[1])c = b + b2c2 = c / 2desv = math.sqrt(c2)/10//calculo MACDmacd = ma4 - ma5//calculo RSIrsi = ta.rsi(close, 9)// calculo Divergenciama = ta.sma(close, longuitud)dist = close - maporcentaje = dist * 100 / closema_dista = ta.sma(porcentaje, 333)//condición de entrada y salida longlong = ma1[1] < ma1 and ma2[1] < ma2 and macd > 0 and px > ma3 and efi_indicador < 9 and px > ma7 and macd[1] < macdclong = efi_indicador > 22000 and px < ma8strategy.entry("BUY", strategy.long, when = long)strategy.close("BUY", when = clong)//condición de entrada y salida shortshort = ma1[1] > ma1 and ma2[1] > ma2 and macd < 0 and px < ma3 and efi_indicador > 9 and macd[1] > macd cshort =  efi_indicador < 14000 and px > ma8 and ma11 > desvstrategy.entry("SELL", strategy.short, when = short)strategy.close("SELL", when = cshort)//SL Y TP//strategy.exit("long exit", "Daily_Mid Term_Consulting BOLT", profit = close * 40 / syminfo.mintick, loss = close * 0.02 / syminfo.mintick)//strategy.exit("shot exit", "Daily_Mid Term_Consulting BOLT", profit = close * 40 / syminfo.mintick, loss = close * 0.02 / syminfo.mintick)// GRAFICA smasplot(ma1, color=color.new(color.orange, 0))plot(ma2, color=color.new(color.orange, 0))plot(ma3, color=color.new(color.orange, 0))plot(ma4, color=color.new(color.orange, 0))plot(ma5, color=color.new(color.orange, 0))plot(ma6, color=color.new(color.green, 0))plot(ma7, color=color.new(color.orange, 0))plot(ma8, color=color.new(color.orange, 0))plot(ma9, color=color.new(color.orange, 0))//GRAFICA MACDplot(macd, color=color.new(color.red, 0), style = plot.style_columns)//GRAFICA DIVERGENCIAplot(porcentaje, style = plot.style_columns)//GRAFICA MA DIVERGENCIAplot(ma_dista, color=color.new(color.white, 0))//GRAFICA MA DIVERGENCIAplot(desv, color=color.new(color.blue, 0))//GRAFICA EFIplot(efi_indicador, color=color.new(color.yellow, 0))// GRAFICA RSIl1 = hline(70, color=color.new(color.green, 0))l2 = hline(30, color=color.new(color.green, 0))plot(rsi, color=color.new(color.white, 0))//prueba 1 stop loss and take profit//sl = 0.05//tp = 0.1    //calculo de precio para sl y tp//longstop=strategy.position_avg_price*(1-sl)//longprofit=strategy.position_avg_price*(1+tp)//shortstop=strategy.position_avg_price*(1+sl)//shortprofit=strategy.position_avg_price*(1-tp)//if (long)  //  strategy.exit("BUY", strategy.long)//sl and tp  long|short//if strategy.entry("BUY", strategy.long)//if strategy.position_avg_price > 0//strategy.exit("BUY", limit = longprofit, stop = longstop)//if strategy.position_avg_price < 0//strategy.exit("SELL", limit = shortprofit, stop=shortstop)