Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

Rocket Grid Algorithm - The Quant Science

A Pine Script v5 strategy built on SMA (close, 10), Valuewhen (trigger_entry, close) and Crossunder (close, destroyall). It has 21 order rules, 20 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 1% of equity and pays 0.07% commission. 14 settings; defaults include Start Date 1, Start Month 1 and Start Year 2018.

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 Rocket Grid Algorithm - The Quant Science repaint?
No
No repainting patterns were found in the source. The live replay was not measured: the script acts only when barstate.isconfirmed is true, which Zeal Terminal's engine never reports during a live replay (it does not run a bar's closing update in live mode), so the replay cannot test this script.
How did Rocket Grid Algorithm - The Quant Science 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.
Does Rocket Grid Algorithm - The Quant Science run in Pine Script v6?
No
The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L190:C11: cannot use 'float' as a condition — Pine Script v6 does not cast 'int' or 'float' to 'bool' implicitly. Wrap it in bool(). The v6 version is shown for reference and is not offered as a download.
Does Rocket Grid Algorithm - The Quant Science use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Rocket Grid Algorithm - The Quant Science run in Zeal Terminal?
Yes
It compiles in 100 ms and runs 1,000 bars in 293 ms, in the browser.

BTCUSDT · 1D · default settings

  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
  • Plot
Prerendered with the defaults. Change anything and run it here. The script runs in your browser.
Settings (14)
0.0050,000100,000AprJulOct2025AprJulOct2026AprJulOct$10,000$20,253Equity from $10,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. Zeal Terminal's engine currently reads an order side written as direction = strategy.long, direction = strategy.short as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 191, 193, 195, 197, 199, 201 and more) so the engine trades the way the script says.
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, $10,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.

Settings

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

SettingDefaultType and rangeFeeds
Strategy Side
Long Strategy |falseboolline 189
Short Selling Strategy falseboolline 210
DATE PERIOD CONFIGURATION
Start Date1int · min 1 · max 31inDateRange
Start Month1int · min 1 · max 12inDateRange
Start Year2018int · min 1800 · max 2100inDateRange
End Date31int · min 1 · max 31inDateRange
End Month12int · min 1 · max 12inDateRange
End Year2023int · min 1800 · max 2100inDateRange
Lenght Configuration
Lenght: 10int · min 0sma
STRATEGY CONFIGURATION
Enable StrategyCreate grid backtesting.falseboolline 89 line 158
Percentage grid: 0.50float · min 0 · step 0.10total_percentage_side
Lower destroyer: 2.00float · min 0 · step 0.10destroyall
Upper destroyer: 2.00float · min 0 · step 0.10takeprofitlevel
Trigger definition
Select strategy: SMA Based Crossunderstring · options [ 'SMA Based Crossunder', 'SMA Based Crossover' ]trigger_entry

What it calculates

  • SMAclose, Lenght: (10)sma · line 35
  • Valuewhentrigger_entry, close, 0p_trigger_event · line 61
  • Crossunderclose, destroyalldes_function · line 135
  • Crossoverclose, takeprofitleveldes_function2 · line 137

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 114 named inputs, calculations, conditions and outputs, too many to draw legibly here; the tables above list them.

Order rules

OrderFires whenBy defaultLine
Open O #1 longnew_ten_grid_1On191
Open O #2 longnew_ten_grid_2On193
Open O #3 longnew_ten_grid_3On195
Open O #4 longnew_ten_grid_4On197
Open O #5 longnew_ten_grid_5On199
Open O #6 longnew_ten_grid_6On201
Open O #7 longnew_ten_grid_7On203
Open O #8 longnew_ten_grid_8On205
Open O #9 longnew_ten_grid_9On207
Open O #10 longnew_ten_grid_10On209
Open O #1 shortnew_ten_grid_1On212
Open O #2 shortnew_ten_grid_2On214
Open O #3 shortnew_ten_grid_3On216
Open O #4 shortnew_ten_grid_4On218
Open O #5 shortnew_ten_grid_5On220
Open O #6 shortnew_ten_grid_6On222
Open O #7 shortnew_ten_grid_7On224
Open O #8 shortnew_ten_grid_8On226
Open O #9 shortnew_ten_grid_9On228
Open O #10 shortnew_ten_grid_10On230
Close >>>> Destroyed Grid <<<<des_function or des_function2 or close <= destroyall or close >= takeprofitlevelOn232

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 measuredAn engine gap, not the scriptThe script acts only when barstate.isconfirmed is true, which Zeal Terminal's engine never reports during a live replay (it does not run a bar's closing update in live mode), so the replay cannot test this script. The answer comes from the checks on the source alone.
  • 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 timingprocess_orders_on_close = true: orders fill at the signal bar's close.

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

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
Rocket Grid Algorithm - The Quant Science this page—v5 strategy0.0%00.0%
Buying Dip Strategy With Take Profit And Stop Loss [racer8] by racer8sma valuewhenv4 strategy−22.3%3434.7%
[fpemehd] Strategy Template by DuDu95sma valuewhenv5 strategy+10.5%4114.8%
Trend Bounce [racer8] by racer8sma valuewhenv4 strategy+2.4%2232.2%
Alert(), alertcondition() or strategy alerts- by Peter_Osma valuewhenv4 strategy+7,640,000.0%191919.9%
Quantitative Trend Strategy- Uptrend long by CheatCode1sma valuewhenv5 strategy+5.9%2832.8%

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.

  • No v6-only features. v6 is not needed to run this script.

Clean v5

Verified

Nothing to change.

Does it run in Pine Script v6?

No

The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L190:C11: cannot use 'float' as a condition — Pine Script v6 does not cast 'int' or 'float' to 'bool' implicitly. Wrap it in bool(). The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯                                                                                                                                                                                                                                                                                                                                           -//@version=5+//@version=6strategy(⋯

Where it runs

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

Zeal Terminal's engine currently reads an order side written as direction = strategy.long, direction = strategy.short as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 191, 193, 195, 197, 199, 201 and more) so the engine trades the way the script says.

“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/// © thequantscience// ██████╗  ██████╗  ██████╗██╗  ██╗███████╗████████╗     ██████╗ ██████╗ ██╗██████╗      █████╗ ██╗      ██████╗  ██████╗ ██████╗ ██╗████████╗██╗  ██╗███╗   ███╗// ██╔══██╗██╔═══██╗██╔════╝██║ ██╔╝██╔════╝╚══██╔══╝    ██╔════╝ ██╔══██╗██║██╔══██╗    ██╔══██╗██║     ██╔════╝ ██╔═══██╗██╔══██╗██║╚══██╔══╝██║  ██║████╗ ████║// ██████╔╝██║   ██║██║     █████╔╝ █████╗     ██║       ██║  ███╗██████╔╝██║██║  ██║    ███████║██║     ██║  ███╗██║   ██║██████╔╝██║   ██║   ███████║██╔████╔██║// ██╔══██╗██║   ██║██║     ██╔═██╗ ██╔══╝     ██║       ██║   ██║██╔══██╗██║██║  ██║    ██╔══██║██║     ██║   ██║██║   ██║██╔══██╗██║   ██║   ██╔══██║██║╚██╔╝██║// ██║  ██║╚██████╔╝╚██████╗██║  ██╗███████╗   ██║       ╚██████╔╝██║  ██║██║██████╔╝    ██║  ██║███████╗╚██████╔╝╚██████╔╝██║  ██║██║   ██║   ██║  ██║██║ ╚═╝ ██║// ╚═╝  ╚═╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝╚══════╝   ╚═╝        ╚═════╝ ╚═╝  ╚═╝╚═╝╚═════╝     ╚═╝  ╚═╝╚══════╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝     ╚═╝                                                                                                                                                                                                                                                                                                                                           //@version=5strategy(     title = 'Rocket Grid Algorithm - The Quant Science',      overlay = true,     initial_capital = 10000,      commission_type = strategy.commission.percent,      commission_value = 0.07,      pyramiding = 10,     default_qty_type = strategy.percent_of_equity,     process_orders_on_close=true     )// #########################################################################################################long  = input.bool(defval = false, title = "Long Strategy   |", inline = "Strategy", group = "Strategy Side")short = input.bool(defval = false, title = "Short Selling Strategy  ", inline = "Strategy", group = "Strategy Side")// #########################################################################################################startDate   = input.int(title="Start Date", defval=1, minval=1, maxval=31, group = "DATE PERIOD CONFIGURATION")startMonth  = input.int(title="Start Month", defval=1, minval=1, maxval=12, group = "DATE PERIOD CONFIGURATION")startYear   = input.int(title="Start Year", defval=2018, minval=1800, maxval=2100, group = "DATE PERIOD CONFIGURATION")endDate     = input.int(title="End Date", defval=31, minval=1, maxval=31, group = "DATE PERIOD CONFIGURATION")endMonth    = input.int(title="End Month", defval=12, minval=1, maxval=12, group = "DATE PERIOD CONFIGURATION")endYear     = input.int(title="End Year", defval=2023, minval=1800, maxval=2100, group = "DATE PERIOD CONFIGURATION")inDateRange = (time >= timestamp(syminfo.timezone, startYear, startMonth, startDate, 0, 0)) and (time < timestamp(syminfo.timezone, endYear, endMonth, endDate, 0, 0))// #########################################################################################################lenght_data = input.int(defval = 10, title = "Lenght: ", minval = 0, group = "Lenght Configuration")// #########################################################################################################sma     = ta.sma(close, lenght_data)// #########################################################################################################ten_grid        = input.bool(defval = false, title = "Enable Strategy", tooltip = "Create grid backtesting.", group = "STRATEGY CONFIGURATION")percentagegrid  = input.float(defval = 0.50, minval = 0, step = 0.10, title = "Percentage grid: ", group = "STRATEGY CONFIGURATION")stop_loss       = input.float(defval = 2.00, minval = 0, step = 0.10, title = "Lower destroyer: ", group = "STRATEGY CONFIGURATION")take_profit     = input.float(defval = 2.00, minval = 0, step = 0.10, title = "Upper destroyer: ", group = "STRATEGY CONFIGURATION")// #########################################################################################################var float high_start = 0 var float high_end   = 0trigger_event_sma1  = ta.crossunder(close, sma)  and barstate.isconfirmedtrigger_event_sma2  = ta.crossover(close,  sma)  and barstate.isconfirmedTriggerGrid(type) =>        switch type        'SMA Based Crossunder'   => trigger_event_sma1==true        'SMA Based Crossover'    => trigger_event_sma2==truetype_input = input.string(     'SMA Based Crossunder',     title = "Select strategy: ",     options = [         'SMA Based Crossunder',          'SMA Based Crossover'         ],     group = "Trigger definition"     )trigger_entry = TriggerGrid(type_input) and strategy.opentrades==0 p_trigger_event       = ta.valuewhen(trigger_entry, close, 0)total_percentage_side = 10 * percentagegridif trigger_entry==true    high_start := p_trigger_event + ((p_trigger_event * total_percentage_side)/100)    high_end   := p_trigger_event - ((p_trigger_event * total_percentage_side)/100)grid_range = high_start - high_endvar float grid_1  = 0var float grid_2  = 0var float grid_3  = 0var float grid_4  = 0var float grid_5  = 0var float grid_6  = 0var float grid_7  = 0var float grid_8  = 0var float grid_9  = 0var float grid_10 = 0var float grid_11  = 0var float grid_12  = 0var float grid_13  = 0var float grid_14  = 0var float grid_15  = 0var float grid_16  = 0var float grid_17  = 0var float grid_18  = 0var float grid_19  = 0var float grid_20  = 0var float factor = 0 var float p = 0if ten_grid == true and trigger_entry==true     factor := grid_range / 20    p := p_trigger_event    // UP GRID    grid_1  := (p + (factor * 1))     grid_2  := (p + (factor * 2))     grid_3  := (p + (factor * 3))     grid_4  := (p + (factor * 4))     grid_5  := (p + (factor * 5))    grid_6  := (p + (factor * 6))     grid_7  := (p + (factor * 7))     grid_8  := (p + (factor * 8))     grid_9  := (p + (factor * 9))    grid_10 := (p + (factor * 10))    // DOWN GRID    grid_11  := (p - (factor * 1))     grid_12  := (p - (factor * 2))     grid_13  := (p - (factor * 3))     grid_14  := (p - (factor * 4))     grid_15  := (p - (factor * 5))    grid_16  := (p - (factor * 6))     grid_17  := (p - (factor * 7))     grid_18  := (p - (factor * 8))     grid_19  := (p - (factor * 9))    grid_20  := (p - (factor * 10))var float new_ten_grid_1  = 0 var float new_ten_grid_2  = 0 var float new_ten_grid_3  = 0 var float new_ten_grid_4  = 0 var float new_ten_grid_5  = 0 var float new_ten_grid_6  = 0 var float new_ten_grid_7  = 0 var float new_ten_grid_8  = 0 var float new_ten_grid_9  = 0 var float new_ten_grid_10 = 0var float new_ten_grid_11  = 0 var float new_ten_grid_12  = 0 var float new_ten_grid_13  = 0 var float new_ten_grid_14  = 0 var float new_ten_grid_15  = 0 var float new_ten_grid_16  = 0 var float new_ten_grid_17  = 0 var float new_ten_grid_18  = 0 var float new_ten_grid_19  = 0 var float new_ten_grid_20  = 0 destroyall = new_ten_grid_20 - (new_ten_grid_20 * stop_loss / 100)des_function = ta.crossunder(close, destroyall)takeprofitlevel = new_ten_grid_10 + (new_ten_grid_10 * take_profit / 100)des_function2 = ta.crossover(close, takeprofitlevel)var float lots_up1  = 0var float lots_up2  = 0var float lots_up3  = 0var float lots_up4  = 0var float lots_up5  = 0var float lots_up6  = 0var float lots_up7  = 0var float lots_up8  = 0var float lots_up9  = 0var float lots_up10 = 0var float lots_down1  = 0var float lots_down2  = 0var float lots_down3  = 0var float lots_down4  = 0var float lots_down5  = 0var float lots_down6  = 0var float lots_down7  = 0var float lots_down8  = 0var float lots_down9  = 0var float lots_down10 = 0if trigger_entry==true and ten_grid==true and inDateRange and strategy.opentrades==0    new_ten_grid_1   := grid_1    new_ten_grid_2   := grid_2    new_ten_grid_3   := grid_3    new_ten_grid_4   := grid_4    new_ten_grid_5   := grid_5    new_ten_grid_6   := grid_6    new_ten_grid_7   := grid_7    new_ten_grid_8   := grid_8    new_ten_grid_9   := grid_9    new_ten_grid_10  := grid_10    new_ten_grid_11  := grid_11    new_ten_grid_12  := grid_12    new_ten_grid_13  := grid_13    new_ten_grid_14  := grid_14    new_ten_grid_15  := grid_15    new_ten_grid_16  := grid_16    new_ten_grid_17  := grid_17    new_ten_grid_18  := grid_18    new_ten_grid_19  := grid_19    new_ten_grid_20  := grid_20    lots_up1  := (((strategy.equity / close) * 10) /100)    lots_up2  := (((strategy.equity / close) * 9)  /100)    lots_up3  := (((strategy.equity / close) * 8)  /100)    lots_up4  := (((strategy.equity / close) * 7)  /100)    lots_up5  := (((strategy.equity / close) * 6)  /100)    lots_up6  := (((strategy.equity / close) * 5)  /100)    lots_up7  := (((strategy.equity / close) * 4)  /100)    lots_up8  := (((strategy.equity / close) * 3)  /100)    lots_up9  := (((strategy.equity / close) * 2)  /100)    lots_up10 := (((strategy.equity / close) * 1)  /100)    if long == true         if new_ten_grid_1            strategy.entry(id = "O #1",  direction = strategy.long, qty = lots_up1,  stop = new_ten_grid_1)        if new_ten_grid_2            strategy.entry(id = "O #2",  direction = strategy.long, qty = lots_up2,  stop = new_ten_grid_2)        if new_ten_grid_3            strategy.entry(id = "O #3",  direction = strategy.long, qty = lots_up3,  stop = new_ten_grid_3)        if new_ten_grid_4            strategy.entry(id = "O #4",  direction = strategy.long, qty = lots_up4,  stop = new_ten_grid_4)        if new_ten_grid_5            strategy.entry(id = "O #5",  direction = strategy.long, qty = lots_up5,  stop = new_ten_grid_5)        if new_ten_grid_6            strategy.entry(id = "O #6",  direction = strategy.long, qty = lots_up6,  stop = new_ten_grid_6)        if new_ten_grid_7            strategy.entry(id = "O #7",  direction = strategy.long, qty = lots_up7,  stop = new_ten_grid_7)        if new_ten_grid_8            strategy.entry(id = "O #8",  direction = strategy.long, qty = lots_up8,  stop = new_ten_grid_8)        if new_ten_grid_9            strategy.entry(id = "O #9",  direction = strategy.long, qty = lots_up9,  stop = new_ten_grid_9)        if new_ten_grid_10            strategy.entry(id = "O #10", direction = strategy.long, qty = lots_up10, stop = new_ten_grid_10)    if short == true         if new_ten_grid_1             strategy.entry(id = "O #1",  direction = strategy.short, qty = lots_up1,  limit = new_ten_grid_1)        if new_ten_grid_2            strategy.entry(id = "O #2",  direction = strategy.short, qty = lots_up2,  limit = new_ten_grid_2)        if new_ten_grid_3             strategy.entry(id = "O #3",  direction = strategy.short, qty = lots_up3,  limit = new_ten_grid_3)        if new_ten_grid_4             strategy.entry(id = "O #4",  direction = strategy.short, qty = lots_up4,  limit = new_ten_grid_4)        if new_ten_grid_5             strategy.entry(id = "O #5",  direction = strategy.short, qty = lots_up5,  limit = new_ten_grid_5)        if new_ten_grid_6             strategy.entry(id = "O #6",  direction = strategy.short, qty = lots_up6,  limit = new_ten_grid_6)        if new_ten_grid_7             strategy.entry(id = "O #7",  direction = strategy.short, qty = lots_up7,  limit = new_ten_grid_7)        if new_ten_grid_8             strategy.entry(id = "O #8",  direction = strategy.short, qty = lots_up8,  limit = new_ten_grid_8)        if new_ten_grid_9             strategy.entry(id = "O #9",  direction = strategy.short, qty = lots_up9,  limit = new_ten_grid_9)        if new_ten_grid_10             strategy.entry(id = "O #10", direction = strategy.short, qty = lots_up10, limit = new_ten_grid_10)if des_function or des_function2 or close <= destroyall or close >= takeprofitlevel    strategy.close_all(">>>> Destroyed Grid <<<<")// #########################################################################################################fill(plot(grid_1, color = color.new(color.rgb(0, 255, 132), 95)),      plot(grid_2, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 80))fill(plot(grid_2, color = color.new(color.rgb(0, 255, 132), 95)),       plot(grid_3, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 85))fill(plot(grid_3, color = color.new(color.rgb(0, 255, 132), 95)),       plot(grid_4, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 85))fill(plot(grid_4, color = color.new(color.rgb(0, 255, 132), 95)),      plot(grid_5, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 90))fill(plot(grid_1, color = color.new(color.rgb(0, 255, 132), 95)),       plot(grid_6, color = color.new(color.rgb(0, 255, 132), 95)),          color = color.new(#00ff08, 80))fill(plot(grid_6, color = color.new(color.rgb(0, 255, 132), 95)),       plot(grid_7, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 80))fill(plot(grid_7, color = color.new(color.rgb(0, 255, 132), 95)),      plot(grid_8, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 85))fill(plot(grid_8, color = color.new(color.rgb(0, 255, 132), 95)),       plot(grid_9, color = color.new(color.rgb(0, 255, 132), 95)),           color = color.new(#00ff08, 85))fill(plot(grid_9, color = color.new(color.rgb(0, 255, 132), 95)),      plot(grid_10, color = color.new(color.rgb(0, 255, 132), 95)),          color = color.new(#00ff08, 90))fill(plot(grid_11, color = color.new(#ff3c00, 95)),      plot(grid_12, color = color.new(#fd3d36, 95)),           color = color.new(#ff0000, 80))fill(plot(grid_12, color = color.new(#ff0000, 95)),       plot(grid_13, color = color.new(#ff0000, 95)),           color = color.new(#ff0000, 85))fill(plot(grid_13, color = color.new(#ff0000, 95)),       plot(grid_14, color = color.new(#ff0000, 95)),           color = color.new(#ff0000, 85))fill(plot(grid_14, color = color.new(#ff0000, 95)),      plot(grid_15, color = color.new(#ff0000, 95)),           color = color.new(#ff0000, 90))fill(plot(grid_11, color = color.new(#ff0000, 95)),       plot(grid_16, color = color.new(#ff0800, 95)),          color = color.new(#ff4800, 80))fill(plot(grid_16, color = color.new(#ff1100, 95)),       plot(grid_17, color = color.new(#ff2600, 95)),           color = color.new(#ff3300, 80))fill(plot(grid_17, color = color.new(#ff0000, 95)),      plot(grid_18, color = color.new(#ff0000, 95)),           color = color.new(#ff3c00, 85))fill(plot(grid_18, color = color.new(#ff3300, 95)),       plot(grid_19, color = color.new(#ff3c00, 95)),           color = color.new(#ff3300, 85))fill(plot(grid_19, color = color.new(#ff3c00, 95)),      plot(grid_20, color = color.new(#ff0800, 95)),          color = color.new(#ff1e00, 90))// #########################################################################################################if strategy.equity <= 0     runtime.error(" BANKRUPTCY: BACKTEST RETURN LOSS > EQUITY !!! ")// ###########################################################################################################