Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

Does your trading pass the seasonality test-

A Pine Script v4 strategy with no technical-analysis calculation. It has 2 order rules, 1 entry among them, and trades long and short with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 25% of equity and pays 0.5% commission. 3 settings; defaults include Position Type Long, Entry Month Oct and Entry Month Jan.

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

BTCUSDT · 1D · default settings

  • Equity
  • Balance
  • 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 (3)
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOctEquity$105,988$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. Lines are what the script plots. Zeal Terminal's engine currently reads an order side written as is_long as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 33) so the engine trades the way the script says.
Net profit
+6.04%
$6,041.10
Buy and hold
+102.5%
same period
Closed trades
2
1 won · 1 lost
Profitable
50.0%
of closed trades
Profit factor
1.81
gross profit ÷ gross loss
Max drawdown
8.09%
−$9,186.96

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.

  • 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 change → ta.change.

v4 → v5

Verified

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

  • Line 3: //@version=4 → //@version=5
  • Line 33: strategy.entry(…, is_long) → strategy.entry(…, (is_long) ? strategy.long : strategy.short)
  • Line 41: change → ta.change
⋯// © EmpiricalFX-//@version=4+//@version=5strategy("Seasonality Benchmark ","Season",overlay=false,default_qty_type=strategy.percent_of_equity,⋯if(strategy.opentrades == 0 and entry == month)-    strategy.entry("Swing",is_long)+    strategy.entry("Swing",(is_long) ? strategy.long : strategy.short)//Exiting a position is conditional on:⋯//Update the balance every time a trade is exited-if(change(strategy.closedtrades)>0)+if(ta.change(strategy.closedtrades)>0)    balance := strategy.equity⋯

Clean v5

VerifiedDownload the v5 script

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

  • Line 7: input() → input.string()
  • Line 8: input() → input.string()
  • Line 9: input() → input.string()
⋯     commission_type=strategy.commission.percent,commission_value=0.5)-input_entry_direction = input("Long","Position Type",options=["Long","Short"])+input_entry_direction = input.string("Long","Position Type",options=["Long","Short"])-input_entry_month = input("Oct","Entry Month",options=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])+input_entry_month = input.string("Oct","Entry Month",options=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])-input_exit_month = input("Jan","Entry Month",options=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])+input_exit_month = input.string("Jan","Entry Month",options=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])//Convert three character month string to integer⋯

Does it run in Pine Script v6?

Yes

Same 2 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine. Both versions were run on Zeal Terminal's engine, and the results are identical. It differs from the v5 version by 1 edit.

Download the v6 script

⋯// © EmpiricalFX-//@version=5+//@version=6strategy("Seasonality Benchmark ","Season",overlay=false,default_qty_type=strategy.percent_of_equity,⋯

Settings

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

SettingDefaultType and rangeFeeds
Position TypeLongstring · options ["Long","Short"]is_long
Entry MonthOctstring · options ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]entry
Entry MonthJanstring · options ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]exit

What it calculates

No technical-analysis calculation: the script works on prices and settings directly.

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.

input_entry_directionPosition Typesetting · Longinput_entry_monthEntry Monthsetting · Octinput_exit_monthEntry Monthsetting · Janret, balanceret · balance2 valuesis_longis_longvalueentryentryvalueexitexitvalueentry:SwingOpen Swingstrategy.entryclose:SwingClose Swingstrategy.closeplot:44Equityplotplot:45Balanceplot

Order rules

OrderFires whenBy defaultLine
Open Swing is_long(strategy.opentrades == 0 and entry == month)On33
Close Swing(strategy.opentrades > 0 and exit == month)On38

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+6.0%+102.5%250%1.818.1%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h−0.1%+5.5%00%0.001.3%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+0.2%+9.8%250%1.0311.3%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−0.1%+8.4%00%0.003.6%8 May 2026 – 21 Oct 2026
SOLUSDT 1D−3.7%+16.7%250%0.6914.3%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h−0.1%+21.5%00%0.004.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D+2.4%+148.3%250%1.536.3%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h−0.1%+17.1%00%0.002.2%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 market0—$0.00
Sideways market250%$6,173.15
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?

6.5%

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

0%7%
All 2 trades
SideEntryExitBarsP&L
long2 Oct 2024 60,804.902 Jan 2025 94,591.8092$13,504.30
long2 Oct 2025 118,595.002 Jan 2026 88,839.1092−$7,331.17

Similar scripts

No other indicator or strategy here shares enough of its calculations.

Where it runs

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

Zeal Terminal's engine currently reads an order side written as is_long as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 33) 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. 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/// © EmpiricalFX//@version=4strategy("Seasonality Benchmark ","Season",overlay=false,default_qty_type=strategy.percent_of_equity,     default_qty_value=25,initial_capital=100000,currency="USD",     commission_type=strategy.commission.percent,commission_value=0.5)input_entry_direction = input("Long","Position Type",options=["Long","Short"])input_entry_month = input("Oct","Entry Month",options=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])input_exit_month = input("Jan","Entry Month",options=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])//Convert three character month string to integermonth_str_to_int(m)=>    ret = m == "Jan" ? 1 :          m == "Feb" ? 2 :          m == "Mar" ? 3 :          m == "Apr" ? 4 :          m == "May" ? 5 :          m == "Jun" ? 6 :          m == "Jul" ? 7 :          m == "Aug" ? 8 :          m == "Sep" ? 9 :          m == "Oct" ? 10 :          m == "Nov" ? 11 :          m == "Dec" ? 12 : -1          is_long = input_entry_direction == "Long" ? true : falseentry = month_str_to_int(input_entry_month)exit = month_str_to_int(input_exit_month)var balance = strategy.equity//Entering a position is conditional on:    //1. No currently active trades    //2. Input entry month matches current monthif(strategy.opentrades == 0 and entry == month)    strategy.entry("Swing",is_long)//Exiting a position is conditional on:    //1. Must have open trade    //2. Input exit month matches current monthif(strategy.opentrades > 0 and exit == month)    strategy.close("Swing")    //Update the balance every time a trade is exitedif(change(strategy.closedtrades)>0)    balance := strategy.equity    plot(strategy.equity,"Equity",color.orange)plot(balance,"Balance",color.red)