Pine Script v5 · Strategy
Striker Play
A Pine Script v5 strategy built on Highest (high, 3) and Lowest (low, 3). It has 2 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. 1 setting; defaults include Number of Previous Candles 3.
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 Striker Play repaint?
- No
- No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 24 of 24 trades.
- How did Striker Play do on BTCUSDT 1D with default settings?
- −3.16%
- From 26 Jan 2024 to 21 Oct 2026, over 88 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
- Does Striker Play 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: 88 before, 112 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 Striker Play use a stop loss?
- No
- Every exit waits for a signal; nothing limits a losing trade before it fires.
- Does Striker Play run in Zeal Terminal?
- Yes
- It compiles in 13 ms and runs 1,000 bars in 24 ms, in the browser.
BTCUSDT · 1D · default settings
- Shape
- Shape
- Winning trade
- Losing trade
- Equity
- Buy and hold
- Net profit
- −3.16%
- −$31,588.00
- Buy and hold
- +102.5%
- same period
- Closed trades
- 88
- 41 won · 47 lost
- Profitable
- 46.6%
- of closed trades
- Profit factor
- 0.84
- gross profit ÷ gross loss
- Max drawdown
- 8.22%
- −$83,858.50
One run with the author's default settings, $1,000,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.
-
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.
| Setting | Default | Type and range | Feeds |
|---|---|---|---|
| Number of Previous Candles | 3 | int · min 1 · max 50 | high1 high2 high3 low1 low2 low3 |
What it calculates
- Highesthigh, Number of Previous Candles (3)
high1 · line 8 - Highesthigh, Number of Previous Candles (3)
high2 · line 9 - Highesthigh, Number of Previous Candles (3)
high3 · line 10 - Lowestlow, Number of Previous Candles (3)
low1 · line 11 - Lowestlow, Number of Previous Candles (3)
low2 · line 12 - Lowestlow, Number of Previous Candles (3)
low3 · line 13
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.
Order rules
| Order | Fires when | By default | Line |
|---|---|---|---|
| Open Buy long | bullishBreakout and strategy.position_size <= 3 | On | 25 |
| Open Sell short | bearishBreakout and strategy.position_size <= 3 | On | 27 |
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.
- 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.
| Market | Net | Buy and hold | Trades | Won | Profit factor | Max drawdown | Period |
|---|---|---|---|---|---|---|---|
| BTCUSDT 1D | −3.2% | +102.5% | 88 | 47% | 0.84 | 8.2% | 26 Jan 2024 – 21 Oct 2026 |
| BTCUSDT 4h | +1.7% | +5.5% | 96 | 50% | 1.35 | 1.2% | 8 May 2026 – 21 Oct 2026 |
| ETHUSDT 1D | −0.4% | +9.8% | 91 | 37% | 0.65 | 0.7% | 26 Jan 2024 – 21 Oct 2026 |
| ETHUSDT 4h | +0.1% | +8.4% | 90 | 49% | 1.57 | 0.0% | 8 May 2026 – 21 Oct 2026 |
| SOLUSDT 1D | −0.0% | +16.7% | 92 | 46% | 0.81 | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| SOLUSDT 4h | +0.0% | +21.5% | 88 | 52% | 1.79 | 0.0% | 8 May 2026 – 21 Oct 2026 |
| BNBUSDT 1D | −0.0% | +148.3% | 92 | 42% | 0.98 | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| BNBUSDT 4h | +0.0% | +17.1% | 90 | 53% | 1.33 | 0.0% | 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 bars | Trades | Won | P&L |
|---|---|---|---|
| Rising market | 30 | 33% | $1,460.49 |
| Sideways market | 35 | 54% | −$6,362.60 |
| Falling market | 23 | 52% | −$26,685.90 |
Rising and falling mean the market moved more than 15% over the 90 bars before entry.
How bad could the drawdown be?
9.8%
The 95th percentile of the worst drawdown when the same 88 trades are reshuffled 5,000 times. The bar spans the 5th to 95th percentile, 4.8% to 9.8%; the tick is what actually happened, 8.0%. Order luck alone moves it this much.
All 88 trades
| Side | Entry | Exit | Bars | P&L |
|---|---|---|---|---|
| long | 13 Feb 2024 48,567.40 | 20 Mar 2024 65,255.50 | 36 | $16,688.10 |
| short | 20 Mar 2024 65,255.50 | 2 Apr 2024 67,075.00 | 13 | −$1,819.50 |
| long | 2 Apr 2024 67,075.00 | 4 Apr 2024 67,958.00 | 2 | $883.00 |
| short | 4 Apr 2024 67,958.00 | 9 Apr 2024 70,122.90 | 5 | −$2,164.91 |
| long | 9 Apr 2024 70,122.90 | 15 Apr 2024 65,983.20 | 6 | −$4,139.68 |
| short | 15 Apr 2024 65,983.20 | 24 Apr 2024 65,161.20 | 9 | $822.02 |
| long | 24 Apr 2024 65,161.20 | 3 May 2024 60,643.40 | 9 | −$4,517.80 |
| short | 3 May 2024 60,643.40 | 9 May 2024 60,725.90 | 6 | −$82.51 |
| long | 9 May 2024 60,725.90 | 12 Jun 2024 68,123.50 | 34 | $7,397.55 |
| short | 12 Jun 2024 68,123.50 | 3 Jul 2024 61,560.90 | 21 | $6,562.59 |
| long | 3 Jul 2024 61,560.90 | 6 Jul 2024 57,885.90 | 3 | −$3,674.94 |
| short | 6 Jul 2024 57,885.90 | 23 Jul 2024 65,833.70 | 17 | −$7,947.72 |
| long | 23 Jul 2024 65,833.70 | 26 Jul 2024 66,792.80 | 3 | $959.12 |
| short | 26 Jul 2024 66,792.80 | 30 Jul 2024 65,828.40 | 4 | $964.43 |
| long | 30 Jul 2024 65,828.40 | 6 Aug 2024 55,599.10 | 7 | −$10,229.20 |
| short | 6 Aug 2024 55,599.10 | 11 Aug 2024 58,347.60 | 5 | −$2,748.46 |
| long | 11 Aug 2024 58,347.60 | 16 Aug 2024 58,939.30 | 5 | $591.70 |
| short | 16 Aug 2024 58,939.30 | 27 Aug 2024 61,869.20 | 11 | −$2,929.96 |
| long | 27 Aug 2024 61,869.20 | 2 Sep 2024 58,572.50 | 6 | −$3,296.69 |
| short | 2 Sep 2024 58,572.50 | 11 Sep 2024 55,858.50 | 9 | $2,714.04 |
| long | 11 Sep 2024 55,858.50 | 7 Oct 2024 63,120.10 | 26 | $7,261.56 |
| short | 7 Oct 2024 63,120.10 | 21 Oct 2024 68,296.20 | 14 | −$5,176.12 |
| long | 21 Oct 2024 68,296.20 | 5 Nov 2024 69,555.80 | 15 | $1,259.66 |
| short | 5 Nov 2024 69,555.80 | 14 Nov 2024 86,740.80 | 9 | −$17,185.00 |
| long | 14 Nov 2024 86,740.80 | 27 Nov 2024 94,831.40 | 13 | $8,090.63 |
| short | 27 Nov 2024 94,831.40 | 2 Dec 2024 95,206.10 | 5 | −$374.61 |
| long | 2 Dec 2024 95,206.10 | 31 Dec 2024 93,632.20 | 29 | −$1,573.84 |
| short | 31 Dec 2024 93,632.20 | 7 Jan 2025 99,878.40 | 7 | −$6,246.17 |
| long | 7 Jan 2025 99,878.40 | 15 Jan 2025 97,612.60 | 8 | −$2,265.75 |
| short | 15 Jan 2025 97,612.60 | 19 Jan 2025 101,183.00 | 4 | −$3,569.97 |
| long | 19 Jan 2025 101,183.00 | 28 Jan 2025 102,083.00 | 9 | $900.22 |
| short | 28 Jan 2025 102,083.00 | 21 Feb 2025 96,049.70 | 24 | $6,033.11 |
| long | 21 Feb 2025 96,049.70 | 2 Mar 2025 89,378.00 | 9 | −$6,671.71 |
| short | 2 Mar 2025 89,378.00 | 3 Mar 2025 86,629.30 | 1 | $2,748.75 |
| long | 3 Mar 2025 86,629.30 | 11 Mar 2025 82,178.60 | 8 | −$4,450.68 |
| short | 11 Mar 2025 82,178.60 | 20 Mar 2025 84,067.30 | 9 | −$1,888.75 |
| long | 20 Mar 2025 84,067.30 | 1 Apr 2025 84,700.60 | 12 | $633.27 |
| short | 1 Apr 2025 84,700.60 | 2 Apr 2025 83,429.00 | 1 | $1,271.61 |
| long | 2 Apr 2025 83,429.00 | 7 Apr 2025 80,936.90 | 5 | −$2,492.07 |
| short | 7 Apr 2025 80,936.90 | 4 May 2025 95,167.00 | 27 | −$14,230.10 |
| long | 4 May 2025 95,167.00 | 3 Jun 2025 106,453.00 | 30 | $11,285.80 |
| short | 3 Jun 2025 106,453.00 | 12 Jun 2025 107,201.00 | 9 | −$747.78 |
| long | 12 Jun 2025 107,201.00 | 23 Jun 2025 103,681.00 | 11 | −$3,519.35 |
| short | 23 Jun 2025 103,681.00 | 30 Jun 2025 107,443.00 | 7 | −$3,761.35 |
| long | 30 Jun 2025 107,443.00 | 2 Jul 2025 107,020.00 | 2 | −$422.21 |
| short | 2 Jul 2025 107,020.00 | 4 Jul 2025 107,415.00 | 2 | −$394.67 |
| long | 4 Jul 2025 107,415.00 | 4 Aug 2025 115,463.00 | 31 | $8,047.64 |
| short | 4 Aug 2025 115,463.00 | 14 Aug 2025 120,859.00 | 10 | −$5,396.22 |
| long | 14 Aug 2025 120,859.00 | 19 Aug 2025 116,608.00 | 5 | −$4,251.38 |
| short | 19 Aug 2025 116,608.00 | 24 Aug 2025 114,557.00 | 5 | $2,050.65 |
| long | 24 Aug 2025 114,557.00 | 28 Aug 2025 113,152.00 | 4 | −$1,404.87 |
| short | 28 Aug 2025 113,152.00 | 4 Sep 2025 109,513.00 | 7 | $3,638.79 |
| long | 4 Sep 2025 109,513.00 | 28 Sep 2025 111,286.00 | 24 | $1,772.50 |
| short | 28 Sep 2025 111,286.00 | 10 Oct 2025 118,931.00 | 12 | −$7,645.07 |
| long | 10 Oct 2025 118,931.00 | 11 Oct 2025 113,099.00 | 1 | −$5,832.20 |
| short | 11 Oct 2025 113,099.00 | 21 Oct 2025 108,904.00 | 10 | $4,194.17 |
| long | 21 Oct 2025 108,904.00 | 2 Nov 2025 111,195.00 | 12 | $2,290.71 |
| short | 2 Nov 2025 111,195.00 | 11 Nov 2025 104,035.00 | 9 | $7,160.12 |
| long | 11 Nov 2025 104,035.00 | 23 Nov 2025 86,880.00 | 12 | −$17,155.10 |
| short | 23 Nov 2025 86,880.00 | 25 Nov 2025 86,364.00 | 2 | $516.00 |
| long | 25 Nov 2025 86,364.00 | 2 Dec 2025 87,911.40 | 7 | $1,547.39 |
| short | 2 Dec 2025 87,911.40 | 5 Dec 2025 88,986.40 | 3 | −$1,074.99 |
| long | 5 Dec 2025 88,986.40 | 16 Dec 2025 87,890.60 | 11 | −$1,095.78 |
| short | 16 Dec 2025 87,890.60 | 6 Jan 2026 92,051.50 | 21 | −$4,160.94 |
| long | 6 Jan 2026 92,051.50 | 26 Jan 2026 88,649.90 | 20 | −$3,401.68 |
| short | 26 Jan 2026 88,649.90 | 16 Feb 2026 67,839.00 | 21 | $20,810.90 |
| long | 16 Feb 2026 67,839.00 | 20 Feb 2026 67,998.30 | 4 | $159.34 |
| short | 20 Feb 2026 67,998.30 | 3 Mar 2026 66,563.00 | 11 | $1,435.34 |
| long | 3 Mar 2026 66,563.00 | 9 Mar 2026 68,519.20 | 6 | $1,956.24 |
| short | 9 Mar 2026 68,519.20 | 18 Mar 2026 72,613.00 | 9 | −$4,093.80 |
| long | 18 Mar 2026 72,613.00 | 23 Mar 2026 69,363.80 | 5 | −$3,249.21 |
| short | 23 Mar 2026 69,363.80 | 2 Apr 2026 66,794.70 | 10 | $2,569.09 |
| long | 2 Apr 2026 66,794.70 | 29 Apr 2026 77,576.10 | 27 | $10,781.40 |
| short | 29 Apr 2026 77,576.10 | 7 May 2026 79,937.80 | 8 | −$2,361.65 |
| long | 7 May 2026 79,937.80 | 14 May 2026 80,567.30 | 7 | $629.55 |
| short | 14 May 2026 80,567.30 | 17 Jun 2026 65,355.40 | 34 | $15,211.90 |
| long | 17 Jun 2026 65,355.40 | 22 Jun 2026 64,632.00 | 5 | −$723.36 |
| short | 22 Jun 2026 64,632.00 | 6 Jul 2026 62,623.90 | 14 | $2,008.11 |
| long | 6 Jul 2026 62,623.90 | 14 Jul 2026 63,164.50 | 8 | $540.61 |
| short | 14 Jul 2026 63,164.50 | 17 Jul 2026 63,462.50 | 3 | −$297.94 |
| long | 17 Jul 2026 63,462.50 | 26 Jul 2026 65,239.80 | 9 | $1,777.34 |
| short | 26 Jul 2026 65,239.80 | 11 Aug 2026 63,662.60 | 16 | $1,577.21 |
| long | 11 Aug 2026 63,662.60 | 12 Aug 2026 64,356.20 | 1 | $693.62 |
| short | 12 Aug 2026 64,356.20 | 4 Sep 2026 79,282.00 | 23 | −$14,925.80 |
| long | 4 Sep 2026 79,282.00 | 9 Sep 2026 79,090.00 | 5 | −$192.00 |
| short | 9 Sep 2026 79,090.00 | 23 Sep 2026 83,760.90 | 14 | −$4,670.85 |
| long | 23 Sep 2026 83,760.90 | 11 Oct 2026 83,546.30 | 18 | −$214.57 |
| short | 11 Oct 2026 83,546.30 | 12 Oct 2026 82,901.30 | 1 | $645.02 |
Similar scripts
Indicators and strategies built from the same calculations, run on BTCUSDT 1D with their own defaults so they can be compared directly.
| Script | Shares | Type | Net | Trades | Max drawdown |
|---|---|---|---|---|---|
| Striker Play this page | — | v5 strategy | −3.2% | 88 | 8.2% |
| Alex Days HiLo Rajib by 14rajib | highest lowest | v4 strategy | No trades on this market | ||
| Donchian Strat EXMO by pskoroplas | highest lowest | v4 strategy | +12.1% | 22 | 68.0% |
| Average Highest High and Lowest Low Swinger Strategy by exlux99 | lowest highest | v4 strategy | +6.4% | 20 | 49.6% |
| Highest High and Lowest Low Channel Strategy by ceyhun | highest lowest | v5 strategy | −3.7% | 26 | 7.9% |
| Donchian Channels System [racer8] by racer8 | highest lowest | v4 strategy | −3.2% | 36 | 43.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.
- No v6-only features. v6 is not needed to run this script.
Clean v5
VerifiedNothing to change.
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: 88 before, 112 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.
⋯// © RickyCadan-//@version=5+//@version=6strategy("Striker Play", overlay=true)⋯Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 13 ms | Yes 1,000 bars in 24 ms | Not measured |
| PineTS | Not tested | Not tested | Not 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/// © RickyCadan//@version=5strategy("Striker Play", overlay=true)// Define the input for the number of previous candles to useiPrevCandles = input.int(defval=3, title="Number of Previous Candles", minval=1, maxval=50)// Calculate the high and low of the previous candleshigh1 = ta.highest(high, iPrevCandles)high2 = ta.highest(high, iPrevCandles)[1]high3 = ta.highest(high, iPrevCandles)[2]low1 = ta.lowest(low, iPrevCandles)low2 = ta.lowest(low, iPrevCandles)[1]low3 = ta.lowest(low, iPrevCandles)[2]// Determine if a bullish breakout occurredbullishBreakout = close > high2 and high3// Determine if a bearish breakout occurredbearishBreakout = close < low2 and low3// Plot buy and sell signalsplotshape(series=bullishBreakout ? 1 : 0, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, text="Buy", textcolor = color.green)plotshape(series=bearishBreakout ? 1 : 0, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, text="Sell", textcolor = color.red)// Calculate the 50% retracement of the breakout candleretracePrice = bullishBreakout ? (high1 + low1) / 2 : bearishBreakout ? (high1 + low1) / 2 : na// Enter limit orders at the 50% retracement of the breakout candleif bullishBreakout and strategy.position_size <= 3 strategy.entry("Buy", strategy.long, limit=retracePrice, comment="Buy Limit")if bearishBreakout and strategy.position_size <= 3 strategy.entry("Sell", strategy.short, limit=retracePrice, comment="Sell Limit")