Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

Aggresive Scalper-Swing Crypto Strategy

A Pine Script v4 strategy built on Lowest (low, 60), Highest (high, 60) and ATR (1). It has 3 order rules, 1 entry among them, and trades long only with the default settings. Exits use a stop loss and a profit target. Each trade is one contract and pays no commission. 4 settings; defaults include Number of candles 60, Length VORTEX 14 and TP Long 0.1.

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 Aggresive Scalper-Swing Crypto Strategy repaint?
No
No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
How did Aggresive Scalper-Swing Crypto Strategy do on BTCUSDT 1D with default settings?
−7.36%
From 26 Jan 2024 to 21 Oct 2026, over 3 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Can Aggresive Scalper-Swing Crypto Strategy 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 Aggresive Scalper-Swing Crypto Strategy use a stop loss?
Yes
strategy.exit sets a stop on line 23.
Does Aggresive Scalper-Swing Crypto Strategy run in Zeal Terminal?
Yes
It compiles in 10 ms and runs 1,000 bars in 31 ms, in the browser.

BTCUSDT · 1D · default settings

  • Lowest
  • Highest
  • ATR
  • 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 (4)
25,00050,00075,000100,000125,000AprJulOct2025AprJulOct2026AprJulOct$92,640$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. The script plots nothing itself; the lines and the lower pane are its own calculations, drawn for reference. Zeal Terminal's engine currently reads an order side written as 1 as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 22) so the engine trades the way the script says.
Net profit
−7.36%
−$7,360.05
Buy and hold
+102.5%
same period
Closed trades
3
1 won · 2 lost
Profitable
33.3%
of closed trades
Profit factor
0.56
gross profit ÷ gross loss
Max drawdown
16.03%
−$17,525.70

One run with the author's default settings, $100,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 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.

  • Note

    Uses an argument v6 removed

    when = on line 22, 24. The upgraded version below moves each call inside an if block.

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 lowest → ta.lowest, highest → ta.highest, sum → math.sum, abs → math.abs, atr → ta.atr, crossover → ta.crossover, crossunder → ta.crossunder.
  • 2 strategy calls use the when = argument (line 22, 24). It is deprecated in v5 and removed in v6, where each call moves inside an if block.

v4 → v5

Verified

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

  • Line 3: //@version=4 → //@version=5
  • Line 6: lowest → ta.lowest
  • Line 7: highest → ta.highest
  • Line 13: sum → math.sum
  • Line 13: abs → math.abs
  • Line 14: sum → math.sum
8 more edits
  • Line 14: abs → math.abs
  • Line 15: sum → math.sum
  • Line 15: atr → ta.atr
  • Line 18: crossover → ta.crossover
  • Line 18: crossover → ta.crossover
  • Line 19: crossunder → ta.crossunder
  • Line 19: crossunder → ta.crossunder
  • Line 22: strategy.entry(…, 1) → strategy.entry(…, strategy.long)
⋯// © exlux99-//@version=4+//@version=5strategy(title="Crypto Price Scalper", shorttitle="Scalper Crypto", overlay=true)inputcc = input(60, title="Number of candles")-low9=lowest(low,inputcc)+low9=ta.lowest(low,inputcc)-high9=highest(high,inputcc)+high9=ta.highest(high,inputcc)plotlow = ((close - low9) / low9) * 100⋯period_ = input(14, title="Length VORTEX", minval=2)-VMP = sum( abs( high - low[1]), period_ )+VMP = math.sum( math.abs( high - low[1]), period_ )-VMM = sum( abs( low - high[1]), period_ )+VMM = math.sum( math.abs( low - high[1]), period_ )-STR = sum( atr(1), period_ )+STR = math.sum( ta.atr(1), period_ )VIP = VMP / STRVIM = VMM / STR-long= crossover(plotg,center) and close > high[2] and crossover(VIP,VIM)+long= ta.crossover(plotg,center) and close > high[2] and ta.crossover(VIP,VIM)-short= crossunder(plotg,center) and crossunder(VIP,VIM)+short= ta.crossunder(plotg,center) and ta.crossunder(VIP,VIM)tplong=input(0.1, title="TP Long", step=0.01)sllong=input(0.1, title="SL Long", step=0.01)-strategy.entry("long",1,when=long)+strategy.entry("long",strategy.long,when=long)strategy.exit("closelong", "long" , profit = close * tplong / syminfo.mintick, loss = close * sllong / syminfo.mintick, alert_message = "closelong")⋯

Clean v5

VerifiedDownload the v5 script

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

  • Line 5: input() → input.int()
  • Line 12: input() → input.int()
  • Line 20: input() → input.float()
  • Line 21: input() → input.float()
  • Line 22: when = long → if block
  • Line 24: when = short → if block
⋯strategy(title="Crypto Price Scalper", shorttitle="Scalper Crypto", overlay=true)-inputcc = input(60, title="Number of candles")+inputcc = input.int(60, title="Number of candles")low9=ta.lowest(low,inputcc)⋯center=0.0-period_ = input(14, title="Length VORTEX", minval=2)+period_ = input.int(14, title="Length VORTEX", minval=2)VMP = math.sum( math.abs( high - low[1]), period_ )⋯short= ta.crossunder(plotg,center) and ta.crossunder(VIP,VIM)-tplong=input(0.1, title="TP Long", step=0.01)+tplong=input.float(0.1, title="TP Long", step=0.01)-sllong=input(0.1, title="SL Long", step=0.01)+sllong=input.float(0.1, title="SL Long", step=0.01)-strategy.entry("long",strategy.long,when=long)+if long+    strategy.entry("long",strategy.long)strategy.exit("closelong", "long" , profit = close * tplong / syminfo.mintick, loss = close * sllong / syminfo.mintick, alert_message = "closelong")-strategy.close("long",when=short)+if short+    strategy.close("long")

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: 3 before, 2 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.

⋯// © exlux99-//@version=5+//@version=6strategy(title="Crypto Price Scalper", shorttitle="Scalper Crypto", overlay=true)⋯

Settings

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

SettingDefaultType and rangeFeeds
Number of candles60intlow9 high9
Length VORTEX14int · min 2VMP VMM STR
TP Long0.1float · step 0.01exit closelong
SL Long0.1float · step 0.01exit closelong

What it calculates

  • Lowest (lowest, ta.lowest in v5)low, Number of candles (60)low9 · line 6
  • Highest (highest, ta.highest in v5)high, Number of candles (60)high9 · line 7
  • ATR (atr, ta.atr in v5)1STR · line 15

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.

lowlowprice datainputccNumber of candlessetting · 60highhighprice datahigh · low · closehigh · low · closeprice dataperiod_Length VORTEXsetting · 14closecloseprice datalow9Lowest→ low9high9Highest→ high9STRATR→ STRplotlowplotlowvalueplothighplothighvalueplotgplotgvalueVMP, VMMVMP · VMM2 valuesVIPVIPvalueVIMVIMvaluelonglongconditionshortshortconditionentry:longOpen longstrategy.entryexit:closelongexit closelongstrategy.exitclose:longClose longstrategy.close

Order rules

OrderFires whenBy defaultLine
Open long longlongcrossover(plotg,center) and close > high[2] and crossover(VIP,VIM)On22
Exit closelong stop and limitevery barOn23
Close longshortcrossunder(plotg,center) and crossunder(VIP,VIM)On24

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−7.4%+102.5%333%0.5616.0%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h+9.4%+5.5%367%24.166.0%8 May 2026 – 21 Oct 2026
ETHUSDT 1D−0.1%+9.8%333%0.720.4%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−0.1%+8.4%20%0.000.1%8 May 2026 – 21 Oct 2026
SOLUSDT 1D+0.0%+16.7%580%2.010.0%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h+0.0%+21.5%450%1.410.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D0.0%+148.3%00%—0.0%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h+0.1%+17.1%450%7.080.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 barsTradesWonP&L
Rising market0—$0.00
Sideways market333%−$7,360.05
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?

15.3%

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

0%18%
All 3 trades
SideEntryExitBarsP&L
long13 Apr 2025 85,276.9023 Apr 2025 94,621.2010$9,344.30
long2 Oct 2025 118,595.0010 Oct 2025 106,429.008−$12,166.20
long27 Oct 2025 114,559.0030 Oct 2025 110,021.003−$4,538.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
Aggresive Scalper-Swing Crypto Strategy this page—v4 strategy−7.4%316.0%
Donchian Channels Strategy by KrisWaters by kriswatershighest lowest atrv4 strategy+55.8%2123.3%
Chandelier Exit - Strategy by melihtunaatr highest lowestv4 strategy−34.8%1143.2%
ETF trader by FX_mindsatr lowest highestv4 strategy+78.3%1732.7%
Chandelier Exit by Zeal Terminalatr highest lowestv5 indicatorindicator
DC Breakout Strategy - This is simplicity at its finest. by Robrecht99highest lowest atrv5 strategy+10.8%578.3%

Where it runs

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

Zeal Terminal's engine currently reads an order side written as 1 as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 22) 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/// © exlux99//@version=4strategy(title="Crypto Price Scalper", shorttitle="Scalper Crypto", overlay=true)inputcc = input(60, title="Number of candles")low9=lowest(low,inputcc)high9=highest(high,inputcc)plotlow = ((close - low9) / low9) * 100plothigh = ((close - high9) / high9) * 100plotg = (plotlow +plothigh)/2center=0.0period_ = input(14, title="Length VORTEX", minval=2)VMP = sum( abs( high - low[1]), period_ )VMM = sum( abs( low - high[1]), period_ )STR = sum( atr(1), period_ )VIP = VMP / STRVIM = VMM / STRlong= crossover(plotg,center) and close > high[2] and crossover(VIP,VIM)short= crossunder(plotg,center) and crossunder(VIP,VIM)tplong=input(0.1, title="TP Long", step=0.01)sllong=input(0.1, title="SL Long", step=0.01)strategy.entry("long",1,when=long)strategy.exit("closelong", "long" , profit = close * tplong / syminfo.mintick, loss = close * sllong / syminfo.mintick, alert_message = "closelong")strategy.close("long",when=short)